add cloud_mode

This commit is contained in:
Brian Cao
2022-10-12 15:35:33 -07:00
parent 9147415761
commit db1ae3f2c7
13 changed files with 103 additions and 25 deletions

View File

@@ -2,9 +2,9 @@ import React from 'react';
import Layout from 'components/layout/Layout';
import { FormattedMessage } from 'react-intl';
export default function Custom404() {
export default function Custom404({ settingsDisabled }) {
return (
<Layout>
<Layout settingsDisabled={settingsDisabled}>
<div className="row justify-content-center">
<h1>
<FormattedMessage id="message.page-not-found" defaultMessage="Page not found" />
@@ -13,3 +13,11 @@ export default function Custom404() {
</Layout>
);
}
export async function getServerSideProps() {
return {
props: {
settingsDisabled: !!process.env.CLOUD_MODE,
},
};
}