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,4 +1,4 @@
import React, { useState, useEffect, useContext } from 'react';
import React, { useState, useEffect, useContext, ReactElement } from 'react';
import { Row, Col, Typography, Menu, Dropdown, Spin, Alert } from 'antd';
import { getUnixTime, sub } from 'date-fns';
import dynamic from 'next/dynamic';
@@ -10,6 +10,8 @@ import { ServerStatusContext } from '../../utils/server-status-context';
import { VIEWERS_OVER_TIME, ACTIVE_VIEWER_DETAILS, fetchData } from '../../utils/apis';
import { AdminLayout } from '../../components/layouts/AdminLayout';
// Lazy loaded components
const DownOutlined = dynamic(() => import('@ant-design/icons/DownOutlined'), {
@@ -157,3 +159,7 @@ export default function ViewersOverTime() {
</>
);
}
ViewersOverTime.getLayout = function getLayout(page: ReactElement) {
return <AdminLayout page={page} />;
};