-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ea3270
commit 3a738fc
Showing
13 changed files
with
169 additions
and
21 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Hydrate from '@/lib/react-query/hydrate'; | ||
|
||
import { prefetchQueries } from '@/app/prefetch'; | ||
|
||
import Story from '@/containers/story'; | ||
|
||
export default async function StoryPage({ | ||
params, | ||
}: { | ||
params: { | ||
storyId: string; | ||
step: string; | ||
}; | ||
}) { | ||
const dehydratedState = await prefetchQueries(); | ||
|
||
return ( | ||
<Hydrate state={dehydratedState}> | ||
<Story storyId={params.storyId} step={params.step} /> | ||
</Hydrate> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
'use client'; | ||
|
||
import { Inter as SansFont } from 'next/font/google'; | ||
import localFont from 'next/font/local'; | ||
import { useServerInsertedHTML } from 'next/navigation'; | ||
|
||
const sans = SansFont({ | ||
subsets: ['latin'], | ||
variable: '--font-inter', | ||
fallback: ['system-ui', 'Helvetica Neue', 'Helvetica', 'Arial'], | ||
weight: ['400'], | ||
display: 'swap', | ||
}); | ||
|
||
const esaNotes = localFont({ | ||
src: [ | ||
{ | ||
path: '../../../public/fonts/NotesEsaBol.otf', | ||
weight: 'bold', | ||
style: 'normal', | ||
}, | ||
{ | ||
path: '../../../public/fonts/NotesEsaBolIta.otf', | ||
weight: 'bold', | ||
style: 'italic', | ||
}, | ||
{ | ||
path: '../../../public/fonts/NotesEsaReg.otf', | ||
weight: 'normal', | ||
style: 'normal', | ||
}, | ||
{ | ||
path: '../../../public/fonts/NotesEsaRegIta.otf', | ||
weight: 'normal', | ||
style: 'italic', | ||
}, | ||
], | ||
display: 'swap', | ||
variable: '--font-esa-notes', | ||
}); | ||
|
||
function Fonts() { | ||
useServerInsertedHTML(() => { | ||
return ( | ||
<style | ||
dangerouslySetInnerHTML={{ | ||
__html: ` | ||
:root { | ||
--font-inter: ${sans.style.fontFamily}; | ||
--font-esa-notes: ${esaNotes.style.fontFamily}; | ||
} | ||
`, | ||
}} | ||
/> | ||
); | ||
}); | ||
|
||
return null; | ||
} | ||
|
||
export default Fonts; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,35 @@ | ||
'use client'; | ||
|
||
import { useEffect } from 'react'; | ||
|
||
import Link from 'next/link'; | ||
|
||
import { useSetRecoilState } from 'recoil'; | ||
|
||
import { tmpBboxAtom } from '@/store'; | ||
|
||
import Datasets from '@/containers/home/datasets'; | ||
import Map from '@/containers/home/map'; | ||
import Sidebar from '@/containers/home/sidebar'; | ||
import SyncStoreHome from '@/containers/home/sync-store'; | ||
|
||
export default async function Home() { | ||
const bbox: [number, number, number, number] = [-50.45, -66.05, 107.79, 85.05]; | ||
const setBbox = useSetRecoilState(tmpBboxAtom); | ||
|
||
useEffect(() => { | ||
setBbox(bbox); | ||
}, [setBbox]); | ||
|
||
return ( | ||
<> | ||
<main className="flex min-h-screen flex-col"> | ||
<div className="h-screen w-screen"> | ||
<Map /> | ||
<main className="w absolute left-0 top-0 flex h-screen flex-col"> | ||
<div> | ||
<Sidebar> | ||
<Link href="/links">Links</Link> | ||
<Link href="/story1/1">Story 1</Link> | ||
<Datasets /> | ||
</Sidebar> | ||
</div> | ||
</main> | ||
|
||
<SyncStoreHome /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use client'; | ||
|
||
import { useEffect } from 'react'; | ||
|
||
import Link from 'next/link'; | ||
|
||
import { useSetRecoilState } from 'recoil'; | ||
|
||
import { tmpBboxAtom } from '@/store'; | ||
|
||
const Story = ({ storyId, step }: { storyId: string; step: string }) => { | ||
const setTmpBbox = useSetRecoilState(tmpBboxAtom); | ||
|
||
useEffect(() => { | ||
setTmpBbox([20, 0, 25, 1]); | ||
}, [setTmpBbox]); | ||
|
||
return ( | ||
<div className="absolute left-0 top-0 z-50 bg-white"> | ||
<h1> | ||
{storyId} step {step} | ||
</h1> | ||
<Link href="/">Back to Home page</Link> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Story; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters