1
1
import React from 'react'
2
2
import type { Metadata } from 'next'
3
3
4
+ import {
5
+ buildRoomName ,
6
+ Presence ,
7
+ RoomProvider ,
8
+ } from '~/components/modules/activity'
4
9
import { CommentAreaRootLazy } from '~/components/modules/comment'
5
10
import { TocFAB } from '~/components/modules/toc/TocFAB'
6
11
import { BottomToUpSoftScaleTransitionView } from '~/components/ui/transition/BottomToUpSoftScaleTransitionView'
@@ -13,6 +18,7 @@ import { getQueryClient } from '~/lib/query-client.server'
13
18
import { requestErrorHandler } from '~/lib/request.server'
14
19
import { CurrentPageDataProvider } from '~/providers/page/CurrentPageDataProvider'
15
20
import { LayoutRightSideProvider } from '~/providers/shared/LayoutRightSideProvider'
21
+ import { WrappedElementProvider } from '~/providers/shared/WrappedElementProvider'
16
22
import { queries } from '~/queries/definition'
17
23
18
24
import {
@@ -81,20 +87,33 @@ export default async (props: NextPageParams<PageParams>) => {
81
87
< PageLoading >
82
88
< div className = "relative w-full min-w-0" >
83
89
< HeaderMetaInfoSetting />
84
- < article className = "prose" >
85
- < header className = "mb-8" >
86
- < BottomToUpSoftScaleTransitionView lcpOptimization delay = { 0 } >
87
- < PageTitle />
88
- </ BottomToUpSoftScaleTransitionView >
89
90
90
- < BottomToUpSoftScaleTransitionView lcpOptimization delay = { 200 } >
91
- < PageSubTitle />
92
- </ BottomToUpSoftScaleTransitionView >
93
- </ header >
94
- < BottomToUpTransitionView lcpOptimization delay = { 600 } >
95
- { props . children }
96
- </ BottomToUpTransitionView >
97
- </ article >
91
+ < RoomProvider roomName = { buildRoomName ( data . id ) } >
92
+ < WrappedElementProvider >
93
+ < article className = "prose" >
94
+ < header className = "mb-8" >
95
+ < BottomToUpSoftScaleTransitionView
96
+ lcpOptimization
97
+ delay = { 0 }
98
+ >
99
+ < PageTitle />
100
+ </ BottomToUpSoftScaleTransitionView >
101
+
102
+ < BottomToUpSoftScaleTransitionView
103
+ lcpOptimization
104
+ delay = { 200 }
105
+ >
106
+ < PageSubTitle />
107
+ </ BottomToUpSoftScaleTransitionView >
108
+ </ header >
109
+ < BottomToUpTransitionView lcpOptimization delay = { 600 } >
110
+ { props . children }
111
+ </ BottomToUpTransitionView >
112
+
113
+ < Presence />
114
+ </ article >
115
+ </ WrappedElementProvider >
116
+ </ RoomProvider >
98
117
99
118
< BottomToUpSoftScaleTransitionView delay = { 1000 } >
100
119
< PagePaginator />
0 commit comments