mirror of
https://github.com/quepasaevents/qpa-client.git
synced 2023-12-14 05:33:02 +01:00
SSR build fix
This commit is contained in:
parent
78cc43af4a
commit
67101b30a1
|
@ -6,7 +6,7 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"build": "webpack --config ./webpack.config.ts",
|
||||
"start": "NODE_ENV=development webpack-dev-server --config ./webpack.config.ts --hot --progress"
|
||||
"start": "API_URL=http://alpha.quepasaalpujarra.com/graphql webpack --config ./webpack.config.ts --watch --progress"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/node": "^7.6.2",
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
]
|
||||
},
|
||||
"include": [
|
||||
"packages", "@types/index.d.ts"],
|
||||
"../../@types/index.d.ts", "../../@types/graphql.d.ts"],
|
||||
"exclude": [
|
||||
".*/__tests__/.*", "node_modules", "dist", "lib", "__tests__"
|
||||
]
|
||||
|
|
|
@ -10,18 +10,13 @@ import {Helmet} from 'react-helmet'
|
|||
import AppMessages from './App.msg.json'
|
||||
|
||||
const App = () => {
|
||||
const [intlInit, setIntlInit] = React.useState(false)
|
||||
intl.init({
|
||||
currentLocale: 'es-ES',
|
||||
locales: {
|
||||
'en-GB': AppMessages.en,
|
||||
'es-ES': AppMessages.es
|
||||
}
|
||||
}).then(() => setIntlInit(true))
|
||||
|
||||
if (!intlInit) {
|
||||
return null
|
||||
}
|
||||
})
|
||||
return (
|
||||
<Root>
|
||||
<Helmet>
|
||||
|
|
|
@ -11,27 +11,29 @@ import Signout from "./Auth/Signout"
|
|||
import Signup from "./Auth/Signup"
|
||||
import OccurrenceDetails from "./Occurrence/OccurrenceDetails"
|
||||
|
||||
const Routes = () => (
|
||||
<Switch>
|
||||
<Route path="/create" component={CreateEvent}/>
|
||||
<Route
|
||||
path="/event/:eventId/edit"
|
||||
render={(routeProps: RouteComponentProps<{ eventId: string }>) => (
|
||||
<EditEvent eventId={routeProps.match.params.eventId}/>
|
||||
)}
|
||||
/>
|
||||
<Route
|
||||
path="/o/:sanitizedEventName/:occurrenceId"
|
||||
component={OccurrenceDetails}
|
||||
/>
|
||||
<Route path="/init-session/:hash" component={InitializeSession}/>
|
||||
<Route path="/login" component={Login}/>
|
||||
<Route path="/signup" component={Signup}/>
|
||||
<Route path="/logout" component={Signout}/>
|
||||
<Route path="/:month" component={Calendar}/>
|
||||
<Route path="/" component={Calendar}/>
|
||||
<Redirect to="/"/>
|
||||
</Switch>
|
||||
)
|
||||
const Routes = () => {
|
||||
return (
|
||||
<Switch>
|
||||
<Route path="/create" component={CreateEvent}/>
|
||||
<Route
|
||||
path="/event/:eventId/edit"
|
||||
render={(routeProps: RouteComponentProps<{ eventId: string }>) => (
|
||||
<EditEvent eventId={routeProps.match.params.eventId}/>
|
||||
)}
|
||||
/>
|
||||
<Route
|
||||
path="/o/:sanitizedEventName/:occurrenceId"
|
||||
component={OccurrenceDetails}
|
||||
/>
|
||||
<Route path="/init-session/:hash" component={InitializeSession}/>
|
||||
<Route path="/login" component={Login}/>
|
||||
<Route path="/signup" component={Signup}/>
|
||||
<Route path="/logout" component={Signout}/>
|
||||
<Route path="/:month" component={Calendar}/>
|
||||
<Route path="/" component={Calendar}/>
|
||||
<Redirect to="/"/>
|
||||
</Switch>
|
||||
)
|
||||
|
||||
}
|
||||
export default Routes
|
||||
|
|
Loading…
Reference in a new issue