-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path_app.tsx
67 lines (63 loc) · 2.67 KB
/
_app.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import 'bootstrap/dist/css/bootstrap.min.css';
import { SessionProvider } from 'next-auth/react';
import { AppProps } from 'next/app';
import Head from 'next/head';
import React from 'react';
import { Col, Container, Row } from 'react-bootstrap';
import 'react-bootstrap-typeahead/css/Typeahead.css';
import 'react-bootstrap-typeahead/css/Typeahead.bs5.css';
import { ConfirmationServiceProvider } from '../hooks/useConfirmation';
import Footer from '../layouts/footer';
import Header from '../layouts/header';
import './style.scss';
import { StyleSheetManager } from 'styled-components';
import isPropValid from '@emotion/is-prop-valid';
// This implements the default behavior from styled-components v5
function shouldForwardProp(propName: string, target: unknown) {
if (typeof target === 'string') {
// For HTML elements, forward the prop if it is a valid HTML attribute
return isPropValid(propName);
}
// For other elements, forward all props
return true;
}
function Gallformers({ Component, pageProps }: AppProps): JSX.Element {
return (
<StyleSheetManager shouldForwardProp={shouldForwardProp}>
<SessionProvider session={pageProps.session}>
<Container fluid className="p-0 m-0">
<Head>
{/* <script type="text/javascript"> */}
{/* Fix for Firefox autofocus CSS bug See:
http://stackoverflow.com/questions/18943276/html-5-autofocus-messes-up-css-loading/18945951#18945951 */}
{/* </script> */}
<title>Gallformers</title>
<link rel="icon" href="/favicon.ico" />
<meta
name="description"
content="The place to ID and learn about galls on plants in the US and Canada."
/>
</Head>
<Row>
<Col className="m-0 p-0">
<Header />
</Col>
</Row>
<Row>
<Col className="m-3 mb-5 p-2">
<ConfirmationServiceProvider>
<Component {...pageProps} />
</ConfirmationServiceProvider>
</Col>
</Row>
<Row>
<Col className="m-0 p-0">
<Footer />
</Col>
</Row>
</Container>
</SessionProvider>
</StyleSheetManager>
);
}
export default Gallformers;