feat: add interval as a constant

This commit is contained in:
Arman committed 2022-11-14 16:46:45 +01:00
1 parent 5c3c1508d7
commit 782ccba9ab
2 files changed
+5 -4

No files matched your search

+2
View File
@@ -1,5 +1,7 @@
export const PAGE_LIMIT = 12; // default page limit
export const CARD_LIMIT = 6; // default card limit
export const INTERVAL = 5 * 60000; // default interval to check for feedback
export enum Dependencies {
ORGANIZATION = 'dependency:organization',
PROJECT = 'dependency:project',
+3 -4
View File
@@ -12,15 +12,14 @@
import { onMount } from 'svelte';
import { loading } from '../store';
import { feedback } from '$lib/stores/app';
import { INTERVAL } from '$lib/constants';
onMount(() => {
loading.set(false);
// const interval = 5 * 60000;
const interval = 10000;
setInterval(() => {
checkForFeedback(interval);
}, interval);
checkForFeedback(INTERVAL);
}, INTERVAL);
});
function checkForFeedback(interval: number) {