lint fixes
This commit is contained in:
parent
bafd229716
commit
6527f4ac74
|
@ -1,5 +1,11 @@
|
|||
import * as API from "./api"
|
||||
import { authStore, notificationStore, routeStore, screenStore, bindingStore } from "./store"
|
||||
import {
|
||||
authStore,
|
||||
notificationStore,
|
||||
routeStore,
|
||||
screenStore,
|
||||
bindingStore,
|
||||
} from "./store"
|
||||
import { styleable } from "./utils/styleable"
|
||||
import { linkable } from "./utils/linkable"
|
||||
import DataProvider from "./components/DataProvider.svelte"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { writable, derived } from "svelte/store"
|
||||
import { generate } from "shortid"
|
||||
|
||||
|
||||
let NOTIFICATION_TIMEOUT = 3000
|
||||
|
||||
const createNotificationStore = () => {
|
||||
|
@ -9,10 +8,7 @@ const createNotificationStore = () => {
|
|||
|
||||
const send = (message, type = "default") => {
|
||||
_notifications.update(state => {
|
||||
return [
|
||||
...state,
|
||||
{ id: generate(), type, message },
|
||||
]
|
||||
return [...state, { id: generate(), type, message }]
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -27,8 +23,8 @@ const createNotificationStore = () => {
|
|||
set($_notifications)
|
||||
}, NOTIFICATION_TIMEOUT)
|
||||
return () => {
|
||||
clearTimeout(timeout);
|
||||
};
|
||||
clearTimeout(timeout)
|
||||
}
|
||||
}
|
||||
})
|
||||
const { subscribe } = notifications
|
||||
|
|
Loading…
Reference in New Issue