File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { createEffect , Suspense , type ParentProps } from "solid-js"
2- import { useNavigate } from "@solidjs/router"
2+ import { useNavigate , useParams } from "@solidjs/router"
33import { DebugBar } from "@/components/debug-bar"
44import { HelpButton } from "@/components/help-button"
55import { Titlebar , type TitlebarUpdate } from "@/components/titlebar"
6+ import { useNotification } from "@/context/notification"
67import { usePlatform } from "@/context/platform"
78import { setNavigate } from "@/utils/notification-click"
89import { setV2Toast , ToastRegion } from "@/utils/toast"
910
1011export default function NewLayout ( props : ParentProps ) {
1112 const platform = usePlatform ( )
13+ const notification = useNotification ( )
1214 const navigate = useNavigate ( )
15+ const params = useParams < { id ?: string } > ( )
1316 setNavigate ( navigate )
1417
1518 createEffect ( ( ) => setV2Toast ( true ) )
19+ createEffect ( ( ) => {
20+ if ( ! notification . ready ( ) || ! params . id ) return
21+ notification . session . markViewed ( params . id )
22+ } )
1623
1724 const update : TitlebarUpdate = {
1825 version : ( ) => {
You can’t perform that action at this time.
0 commit comments