Make each admin page specify is own layout. Closes #2584
This commit is contained in:
@@ -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} />;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user