File tree Expand file tree Collapse file tree 7 files changed +42
-18
lines changed
Expand file tree Collapse file tree 7 files changed +42
-18
lines changed Original file line number Diff line number Diff line change @@ -50,28 +50,26 @@ const config = {
5050 new WebpackManifestPlugin ( {
5151 publicPath : `${ URL_BASE } /` ,
5252 seed : {
53- name : " app" ,
54- short_name : " app" ,
55- start_url : " index.html" ,
56- display : " standalone" ,
53+ name : ' app' ,
54+ short_name : ' app' ,
55+ start_url : ' index.html' ,
56+ display : ' standalone' ,
5757 icons : [
5858 {
59- src : " favicon.ico" ,
60- sizes : " 512x512" ,
61- type : " image/x-icon"
62- }
59+ src : ' favicon.ico' ,
60+ sizes : ' 512x512' ,
61+ type : ' image/x-icon' ,
62+ } ,
6363 ] ,
64- background_color : " #4e0041" ,
65- theme_color : " #4e0041"
64+ background_color : ' #4e0041' ,
65+ theme_color : ' #4e0041' ,
6666 } ,
6767 generate : ( seed , files , entrypoints ) => {
6868 const manifestFiles = files . reduce ( ( manifest , file ) => {
6969 manifest [ file . name ] = file . path ;
7070 return manifest ;
7171 } , seed ) ;
72- const entrypointFiles = entrypoints . main . filter (
73- fileName => ! fileName . endsWith ( '.map' )
74- ) ;
72+ const entrypointFiles = entrypoints . main . filter ( ( fileName ) => ! fileName . endsWith ( '.map' ) ) ;
7573
7674 return {
7775 files : manifestFiles ,
@@ -85,9 +83,8 @@ const config = {
8583 from : commonPaths . favicon ,
8684 to : commonPaths . outputPath ,
8785 } ,
88- ]
86+ ] ,
8987 } ) ,
90- new webpack . HotModuleReplacementPlugin ( ) ,
9188 ] ,
9289} ;
9390
Original file line number Diff line number Diff line change 2424 } ,
2525
2626 // have a common namespace used around the full app
27- ns : [ 'translations' ] ,
27+ ns : [ 'translations' , 'config' ] ,
2828 defaultNS : 'translations' ,
2929
3030 debug : process . env . NODE_ENV === 'development' ,
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import Cracked from 'components/Animation/Cracked' ;
3+
4+ import './Landing.css' ;
5+ import { useTranslation } from 'react-i18next' ;
6+
7+ const Home = ( ) => {
8+ const { t } = useTranslation ( ) ;
9+
10+ return < Cracked > { t ( 'brand' ) } </ Cracked > ;
11+ } ;
12+
13+ export default Home ;
Original file line number Diff line number Diff line change @@ -2,7 +2,12 @@ import React from 'react';
22import Cracked from 'components/Animation/Cracked' ;
33
44import './Landing.css' ;
5+ import { useTranslation } from 'react-i18next' ;
56
6- const Landing = ( ) => < Cracked > app</ Cracked > ;
7+ const Landing = ( ) => {
8+ const { t } = useTranslation ( 'config' ) ;
9+
10+ return < Cracked > { t ( 'app.title' ) } </ Cracked > ;
11+ } ;
712
813export default Landing ;
Original file line number Diff line number Diff line change @@ -2,10 +2,12 @@ import React from 'react';
22import { Route , Routes } from 'react-router-dom' ;
33
44import Landing from 'pages/Landing' ;
5+ import Home from 'pages/Home' ;
56
67const AppRoutes = ( ) => (
78 < Routes >
89 < Route path = "/" element = { < Landing /> } />
10+ < Route path = "/nan-labs" element = { < Home /> } />
911 </ Routes >
1012) ;
1113
Original file line number Diff line number Diff line change 1+ {
2+ "app" : {
3+ "title" : " React Webpack Boilerplate"
4+ }
5+ }
Original file line number Diff line number Diff line change 1- {}
1+ {
2+ "brand" : " NaNLabs"
3+ }
You can’t perform that action at this time.
0 commit comments