File tree Expand file tree Collapse file tree 5 files changed +46
-31
lines changed
Expand file tree Collapse file tree 5 files changed +46
-31
lines changed Original file line number Diff line number Diff line change 1+ import HeadComponent from '../head'
2+
3+ export default function Page ( { children } ) {
4+ return (
5+ < div style = { {
6+ height : '100vh' ,
7+ width : '100%' } }
8+ >
9+ < HeadComponent />
10+ { children }
11+ </ div >
12+ )
13+ }
Original file line number Diff line number Diff line change 11import Link from 'next/link'
2+ import Page from '@/common/layout/page'
23import { Inter } from 'next/font/google'
34import styles from '@/styles/Home.module.css'
45
56const inter = Inter ( { subsets : [ 'latin' ] } )
67
78export default function HomeComponent ( ) {
89 return (
9- < main className = { styles . main } >
10- < div className = { styles . description } >
11- < div className = { styles . h2 } >
12- < h1 className = { inter . className } >
13- React Hooks Playground
14- </ h1 >
15- </ div >
10+ < Page >
11+ < main className = { styles . main } >
12+ < div className = { styles . description } >
13+ < div className = { styles . h2 } >
14+ < h1 className = { inter . className } >
15+ React Hooks Playground
16+ </ h1 >
17+ </ div >
1618
17- < Link href = "/usesyncexternalstore" className = { styles . card } >
18- useSyncExternalStore
19- </ Link >
20- </ div >
21- </ main >
19+ < Link href = "/usesyncexternalstore" className = { styles . card } >
20+ useSyncExternalStore
21+ </ Link >
22+ </ div >
23+ </ main >
24+ </ Page >
2225 )
2326}
Original file line number Diff line number Diff line change 1+ import Page from '@/common/layout/page'
2+
3+ function UseSyncExternalStoreComponent ( ) {
4+ return (
5+ < Page >
6+ < h2 >
7+ UseSyncExternalStoreComponent
8+ </ h2 >
9+ </ Page >
10+ )
11+ }
12+
13+ export default UseSyncExternalStoreComponent
Original file line number Diff line number Diff line change 1- import HeadComponent from '@/common/layout/head'
21import HomeComponent from '@/components/home'
32
43export default function Home ( ) {
5- return (
6- < >
7- < HeadComponent />
8- < HomeComponent />
9- </ >
10- )
4+ return ( < HomeComponent /> )
115}
Original file line number Diff line number Diff line change 1- import HeadComponent from '@/common/layout/head '
1+ import UseSyncExternalStoreComponent from '@/components/usesyncexternalstore '
22
3- function useSyncExternalStoreContainer ( ) {
4- return (
5- < >
6- < HeadComponent />
7-
8- < h2 >
9- useSyncExternalStoreContainer
10- </ h2 >
11- </ >
12- )
3+ function UseSyncExternalStore ( ) {
4+ return ( < UseSyncExternalStoreComponent /> )
135}
146
15- export default useSyncExternalStoreContainer
7+ export default UseSyncExternalStore
You can’t perform that action at this time.
0 commit comments