Skip to content

Commit

Permalink
fix: notification maybe null
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Aug 30, 2022
1 parent ed71aec commit b010af9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ const IndexView: NextPage<AggregateTop> = (props) => {
}, [])

useEffect(() => {
console.log(notification)

if (!notification?.welcome) {
return
}
Expand All @@ -54,7 +52,7 @@ const IndexView: NextPage<AggregateTop> = (props) => {
return () => {
clearTimeout(timer)
}
}, [notification.welcome])
}, [notification?.welcome])

return (
<main>
Expand Down
2 changes: 1 addition & 1 deletion src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface Function {
enable: boolean
}

notification: {
notification?: {
[key: string]: NotificationType
}
}
Expand Down

0 comments on commit b010af9

Please sign in to comment.