course landing page improvements

This commit is contained in:
Rotimi Best
2023-10-30 04:52:00 +00:00
parent 64a058ebc8
commit d6472a54ca
18 changed files with 189 additions and 112 deletions
+6 -6
View File
@@ -1,4 +1,4 @@
<script>
<script lang="ts">
import { fly } from 'svelte/transition';
import InformationIcon from 'carbon-icons-svelte/lib/Information.svelte';
import WarningIcon from 'carbon-icons-svelte/lib/Warning.svelte';
@@ -8,11 +8,11 @@
import { SNACKBAR_SEVERITY, SNACKBAR_SEVERITY_COLOR } from './constants';
import { snackbarStore, snackbarStoreInitialState } from './store';
let severityColor;
let timeoutId;
let severityColor: string;
let timeoutId: NodeJS.Timeout | undefined;
function handleClose() {
if (typeof $snackbarStore.handleClose === 'number') {
if (typeof $snackbarStore.handleClose === 'function') {
$snackbarStore.handleClose();
}
@@ -21,11 +21,11 @@
...snackbarStoreInitialState
}));
clearTimeout(timeoutId);
timeoutId = null;
timeoutId = undefined;
}
// When open is true trigger autoHideDuration
function handleOpen(open) {
function handleOpen(open: boolean) {
if (!open) {
return;
}