Skip to content

Commit

Permalink
Little fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarrenechea committed Aug 23, 2023
1 parent df3df53 commit 6e20763
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 110 deletions.
Binary file added .DS_Store
Binary file not shown.
26 changes: 23 additions & 3 deletions client/public/images/categories/energy.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 1 addition & 11 deletions client/src/app/[storyId]/[step]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import Hydrate from '@/lib/react-query/hydrate';

import { prefetchQueries } from '@/app/prefetch';

import Story from '@/containers/story';

export default async function StoryPage({
Expand All @@ -12,11 +8,5 @@ export default async function StoryPage({
step: string;
};
}) {
const dehydratedState = await prefetchQueries();

return (
<Hydrate state={dehydratedState}>
<Story storyId={params.storyId} step={params.step} />
</Hydrate>
);
return <Story storyId={params.storyId} step={params.step} />;
}
43 changes: 27 additions & 16 deletions client/src/app/layout-providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import RecoilDevTools from '@/lib/recoil/devtools';

import { TooltipProvider } from '@/components/ui/tooltip';

import { notesESA, sans } from '@/styles/fonts';

export default function Providers({ children }: PropsWithChildren) {
const [queryClient] = useState(() => new QueryClient());
const serialize: Serialize = useCallback((x) => {
Expand All @@ -24,21 +26,30 @@ export default function Providers({ children }: PropsWithChildren) {
return JSON.parse(x);
}, []);
return (
<QueryClientProvider client={queryClient}>
<RecoilRoot>
<MapProvider>
<TooltipProvider>
<RecoilURLSyncNext
location={{ part: 'queryParams' }}
serialize={serialize}
deserialize={deserialize}
>
<RecoilDevTools />
{children}
</RecoilURLSyncNext>
</TooltipProvider>
</MapProvider>
</RecoilRoot>
</QueryClientProvider>
<>
<style jsx global>{`
:root {
--font-inter: ${sans.style.fontFamily};
--font-esa-notes: ${notesESA.style.fontFamily};
}
`}</style>

<QueryClientProvider client={queryClient}>
<RecoilRoot>
<MapProvider>
<TooltipProvider>
<RecoilURLSyncNext
location={{ part: 'queryParams' }}
serialize={serialize}
deserialize={deserialize}
>
<RecoilDevTools />
{children}
</RecoilURLSyncNext>
</TooltipProvider>
</MapProvider>
</RecoilRoot>
</QueryClientProvider>
</>
);
}
11 changes: 3 additions & 8 deletions client/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import Providers from '@/app/layout-providers';

import Map from '@/containers/home/map';

import Fonts from '@/components/ui/fonts';

export const metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
Expand All @@ -16,13 +14,10 @@ export default function RootLayout({ children }: { children: React.ReactNode })
return (
<Providers>
<html lang="en">
<Fonts />
<body className="font-notes h-screen w-screen">
<main className="flex flex-col">
<div>
<Map />
{children}
</div>
<main>
<Map />
{children}
</main>
</body>
</html>
Expand Down
12 changes: 1 addition & 11 deletions client/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
import Hydrate from '@/lib/react-query/hydrate';

import Home from '@/containers/home';

import { prefetchQueries } from './prefetch';

export default async function HomePage() {
const dehydratedState = await prefetchQueries();

return (
<Hydrate state={dehydratedState}>
<Home />
</Hydrate>
);
return <Home />;
}
61 changes: 0 additions & 61 deletions client/src/components/ui/fonts.tsx

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
37 changes: 37 additions & 0 deletions client/src/styles/fonts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { Inter as SansFont } from 'next/font/google';
import localFont from 'next/font/local';

export const sans = SansFont({
subsets: ['latin'],
variable: '--font-inter',
fallback: ['system-ui', 'Helvetica Neue', 'Helvetica', 'Arial'],
weight: ['400'],
display: 'block',
});

export const notesESA = localFont({
src: [
{
path: './NotesEsaBol.otf',
weight: 'bold',
style: 'normal',
},
{
path: './NotesEsaBolIta.otf',
weight: 'bold',
style: 'italic',
},
{
path: './NotesEsaReg.otf',
weight: 'normal',
style: 'normal',
},
{
path: './NotesEsaRegIta.otf',
weight: 'normal',
style: 'italic',
},
],
display: 'block',
variable: '--font-esa-notes',
});

0 comments on commit 6e20763

Please sign in to comment.