Skip to content

Commit 356ba39

Browse files
committed
Refactoring
1 parent 3d2082b commit 356ba39

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

gatsby-browser.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
import React from 'react';
22
import MainContextProvider from './src/contexts/MainContextProvider';
3+
import { Helmet } from 'react-helmet';
34

45
export const wrapRootElement = ({ element }) => (
56
<MainContextProvider>
6-
{element}
7+
<>
8+
<Helmet>
9+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
10+
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
11+
</Helmet>
12+
{element}
13+
</>
714
</MainContextProvider>
815
);

src/components/AlertDialog/index.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ const AlertDialog = ({
2828
>
2929
<DialogTitle id="alert-dialog-title">{title}</DialogTitle>
3030
<DialogContent>
31-
<DialogContentText id="alert-dialog-description">
32-
{content}
33-
</DialogContentText>
31+
{content}
3432
</DialogContent>
3533
<DialogActions>
3634
<Button onClick={handleClose} color="primary" autoFocus>

src/components/Layout/index.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import Alert from '@mui/material/Alert';
55
import { createTheme, ThemeProvider } from '@mui/material/styles';
66
import Button from '@mui/material/Button';
77
import Typography from '@mui/material/Typography';
8-
import { Helmet } from 'react-helmet';
98
import DefaultAppBar from '../DefaultAppBar';
109
import Footer from '../Footer';
1110
import { MainContext } from '../../contexts/MainContextProvider';
@@ -58,10 +57,6 @@ const Layout = ({ children }) => {
5857

5958
return (
6059
<ThemeProvider theme={theme}>
61-
<Helmet>
62-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
63-
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
64-
</Helmet>
6560
<CssBaseline />
6661
<DefaultAppBar title={data.site.siteMetadata.title} />
6762
{children}

0 commit comments

Comments
 (0)