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

This commit is contained in:
Gabe Kangas
2023-01-15 23:12:38 -08:00
parent 3b232f31e1
commit 2853752937
24 changed files with 167 additions and 37 deletions
+7 -1
View File
@@ -1,6 +1,6 @@
import { Button, Space, Table, Typography, Upload } from 'antd';
import { RcFile } from 'antd/lib/upload';
import React, { useEffect, useState } from 'react';
import React, { ReactElement, useEffect, useState } from 'react';
import dynamic from 'next/dynamic';
import FormStatusIndicator from '../../../components/admin/FormStatusIndicator';
@@ -16,6 +16,8 @@ import {
import { RESET_TIMEOUT } from '../../../utils/config-constants';
import { URL_CUSTOM_EMOJIS } from '../../../utils/constants';
import { AdminLayout } from '../../../components/layouts/AdminLayout';
// Lazy loaded components
const DeleteOutlined = dynamic(() => import('@ant-design/icons/DeleteOutlined'), {
@@ -189,4 +191,8 @@ const Emoji = () => {
);
};
Emoji.getLayout = function getLayout(page: ReactElement) {
return <AdminLayout page={page} />;
};
export default Emoji;