Fix Layout bug
This commit is contained in:
parent
c75e5052ad
commit
0b59f529c7
1 changed files with 11 additions and 5 deletions
|
|
@ -26,11 +26,17 @@ const Layout = ({ children }: PropsWithChildren<Props>) => {
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
function getToastCookie() {
|
function getToastCookie() {
|
||||||
const updatedAt = new Date(appState.version.updated_at)
|
if (appState.version.updated_at !== '') {
|
||||||
const cookieValues = getCookie(`update-${format(updatedAt, 'yyyy-MM-dd')}`)
|
const updatedAt = new Date(appState.version.updated_at)
|
||||||
return cookieValues
|
const cookieValues = getCookie(
|
||||||
? (JSON.parse(cookieValues as string) as { seen: true })
|
`update-${format(updatedAt, 'yyyy-MM-dd')}`
|
||||||
: { seen: false }
|
)
|
||||||
|
return cookieValues
|
||||||
|
? (JSON.parse(cookieValues as string) as { seen: true })
|
||||||
|
: { seen: false }
|
||||||
|
} else {
|
||||||
|
return { seen: false }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleToastActionClicked() {
|
function handleToastActionClicked() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue