Skip to content

Commit

Permalink
Merge pull request #4 from bbonkr/dev
Browse files Browse the repository at this point in the history
Update dependencies #3
  • Loading branch information
bbonkr committed Jun 24, 2021
2 parents ea5cd7a + 7671d8f commit 56f6232
Show file tree
Hide file tree
Showing 8 changed files with 6,413 additions and 8,488 deletions.
6 changes: 5 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,17 @@
"sourceType": "module"
},
"extends": [
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": [
"react",
"@typescript-eslint"
]
],
"rules": {
"react/prop-types": "off"
}
}
]
}
4 changes: 4 additions & 0 deletions build/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ module.exports = {
new webpack.HotModuleReplacementPlugin(),
new ReactRefreshPlugin(),
],
output: {
...baseConfig.output,
clean: false,
},
devServer: {
port: 3000,
host: '0.0.0.0',
Expand Down
1 change: 1 addition & 0 deletions build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ module.exports = {
filename: '[name].js',
path: path.join(path.resolve(__dirname, '..'), 'out', 'dist'),
publicPath: 'dist/',
clean: true,
},
};
14,822 changes: 6,367 additions & 8,455 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@loadable/component": "^5.14.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-helmet": "^6.1.0",
"react-helmet-async": "^1.0.9",
"react-router-dom": "^5.2.0"
},
"devDependencies": {
Expand All @@ -42,7 +42,6 @@
"@types/loadable__component": "^5.13.3",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react-helmet": "^6.1.0",
"@types/react-router-dom": "^5.1.7",
"@typescript-eslint/eslint-plugin": "^4.15.2",
"@typescript-eslint/parser": "^4.15.2",
Expand All @@ -54,13 +53,13 @@
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.22.0",
"html-webpack-plugin": "^4.5.2",
"eslint-plugin-react-hooks": "^4.2.0",
"html-webpack-plugin": "^5.3.2",
"prettier": "^2.2.1",
"react-refresh": "^0.9.0",
"style-loader": "^2.0.0",
"type-fest": "^0.21.2",
"typescript": "^4.2.2",
"webpack": "^4.46.0",
"webpack": "^5.40.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.2"
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/About/About.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Helmet } from 'react-helmet';
import { Helmet } from 'react-helmet-async';

export const About = () => {
return (
Expand Down
55 changes: 30 additions & 25 deletions src/components/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
Route,
Redirect,
} from 'react-router-dom';
import { HelmetProvider } from 'react-helmet-async';
import { AsyncComponent, LoadingComponent } from '../AsyncComponent';

const Header = AsyncComponent(() => import('../Header'), {
Expand All @@ -27,32 +28,36 @@ const PageNotFound = AsyncComponent(() => import('../PageNotFound'), {
fallback: <LoadingComponent />,
});

const helmetContext = {};

export const App = () => {
return (
<Router>
<Header />
<Switch>
<Route path="/" exact>
<Home />
</Route>
<Route path="/about" exact>
<About />
</Route>
<Route path="/404" exact>
<PageNotFound />
</Route>
<Route
path="*"
render={(props) => (
<Redirect
to={{
pathname: '/404',
state: { from: props.location },
}}
/>
)}
></Route>
</Switch>
</Router>
<HelmetProvider context={helmetContext}>
<Router>
<Header />
<Switch>
<Route path="/" exact>
<Home />
</Route>
<Route path="/about" exact>
<About />
</Route>
<Route path="/404" exact>
<PageNotFound />
</Route>
<Route
path="*"
render={(props) => (
<Redirect
to={{
pathname: '/404',
state: { from: props.location },
}}
/>
)}
></Route>
</Switch>
</Router>
</HelmetProvider>
);
};
2 changes: 1 addition & 1 deletion src/components/Home/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Helmet } from 'react-helmet';
import { Helmet } from 'react-helmet-async';
import { LoadingComponent } from '../AsyncComponent';

export const Home = () => {
Expand Down

0 comments on commit 56f6232

Please sign in to comment.