Make each admin page specify is own layout. Closes #2584

This commit is contained in:
Gabe Kangas
2023-01-15 23:11:44 -08:00
parent 3b232f31e1
commit 2853752937
24 changed files with 167 additions and 37 deletions

View File

@@ -1,5 +1,5 @@
import { Typography } from 'antd';
import React, { useContext, useEffect, useState } from 'react';
import React, { ReactElement, useContext, useEffect, useState } from 'react';
import { TEXTFIELD_TYPE_TEXTAREA } from '../../components/admin/TextField';
import { TextFieldWithSubmit } from '../../components/admin/TextFieldWithSubmit';
import { ToggleSwitch } from '../../components/admin/ToggleSwitch';
@@ -26,6 +26,8 @@ import {
} from '../../utils/config-constants';
import { ServerStatusContext } from '../../utils/server-status-context';
import { AdminLayout } from '../../components/layouts/AdminLayout';
export default function ConfigChat() {
const { Title } = Typography;
const [formDataValues, setFormDataValues] = useState(null);
@@ -220,3 +222,7 @@ export default function ConfigChat() {
</div>
);
}
ConfigChat.getLayout = function getLayout(page: ReactElement) {
return <AdminLayout page={page} />;
};