-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_app.page.tsx
38 lines (36 loc) · 1.05 KB
/
_app.page.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import '../styles/globals.css';
import 'cropperjs/dist/cropper.css';
import type { AppProps } from 'next/app';
import { useState } from 'react';
import SeoTags from '../components/seoTags';
import FontFaces from '../components/fontFaces';
import TagManager from '../components/tagManager';
import Layout from '../components/layout';
import { Entry } from '../lib/types';
import { StoreContext } from '../lib/store';
export default function MyApp({ Component, pageProps }: AppProps) {
const [entries, setEntries] = useState<Array<Entry>>([]);
const [hasEntries, setHasEntries] = useState(false);
const [selectedEntry, setSelectedEntry] = useState<Entry | null>(null);
return (
<>
<SeoTags />
<FontFaces />
<TagManager />
<StoreContext.Provider
value={{
entries,
hasEntries,
selectedEntry,
setEntries,
setHasEntries,
setSelectedEntry,
}}
>
<Layout>
<Component {...pageProps} />
</Layout>
</StoreContext.Provider>
</>
);
}