Fix to initial loading and cache headers
This commit is contained in:
@ -35,10 +35,6 @@ if (process.env.NODE_ENV === 'production') {
|
|||||||
});
|
});
|
||||||
|
|
||||||
router.get('*', async (ctx) => {
|
router.get('*', async (ctx) => {
|
||||||
ctx.set({
|
|
||||||
'Cache-Control': `max-age=${24*60*60}`,
|
|
||||||
});
|
|
||||||
|
|
||||||
const stats = await sendfile(ctx, path.join(__dirname, '../dist/index.html'));
|
const stats = await sendfile(ctx, path.join(__dirname, '../dist/index.html'));
|
||||||
if (!ctx.status) ctx.throw(httpErrors.NotFound());
|
if (!ctx.status) ctx.throw(httpErrors.NotFound());
|
||||||
});
|
});
|
||||||
|
@ -20,7 +20,7 @@ class Dashboard extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount = () => {
|
componentDidMount = () => {
|
||||||
// store.fetchAtlases(this.props.user.team.id);
|
store.fetchAtlases(this.props.user.team.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
@ -49,27 +49,25 @@ class Dashboard extends React.Component {
|
|||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
|
|
||||||
return (<div></div>);
|
return (
|
||||||
|
<Flex flex={ true }>
|
||||||
|
<Layout
|
||||||
|
actions={ actions }
|
||||||
|
>
|
||||||
|
<CenteredContent>
|
||||||
|
<Flex direction="column" flex={ true }>
|
||||||
|
{ store.isFetching ? (
|
||||||
|
<AtlasPreviewLoading />
|
||||||
|
) : store.atlases && store.atlases.map((atlas) => {
|
||||||
|
return (<AtlasPreview key={ atlas.id } data={ atlas } />);
|
||||||
|
}) }
|
||||||
|
</Flex>
|
||||||
|
</CenteredContent>
|
||||||
|
</Layout>
|
||||||
|
|
||||||
// return (
|
{ this.state.newAtlasVisible && <FullscreenField /> }
|
||||||
// <Flex flex={ true }>
|
</Flex>
|
||||||
// <Layout
|
);
|
||||||
// actions={ actions }
|
|
||||||
// >
|
|
||||||
// <CenteredContent>
|
|
||||||
// <Flex direction="column" flex={ true }>
|
|
||||||
// { store.isFetching ? (
|
|
||||||
// <AtlasPreviewLoading />
|
|
||||||
// ) : store.atlases && store.atlases.map((atlas) => {
|
|
||||||
// return (<AtlasPreview key={ atlas.id } data={ atlas } />);
|
|
||||||
// }) }
|
|
||||||
// </Flex>
|
|
||||||
// </CenteredContent>
|
|
||||||
// </Layout>
|
|
||||||
|
|
||||||
// { this.state.newAtlasVisible && <FullscreenField /> }
|
|
||||||
// </Flex>
|
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,8 +19,6 @@ export default class Home extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
// <SlackAuthLink />
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={ styles.container }>
|
<div className={ styles.container }>
|
||||||
<div className={ styles.content }>
|
<div className={ styles.content }>
|
||||||
@ -46,7 +44,7 @@ export default class Home extends React.Component {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className={ styles.action }>
|
<div className={ styles.action }>
|
||||||
|
<SlackAuthLink />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user