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,10 +1,12 @@
import { Row, Col, Typography } from 'antd';
import React, { useEffect, useState } from 'react';
import React, { ReactElement, useEffect, useState } from 'react';
import dynamic from 'next/dynamic';
import { fetchData, FETCH_INTERVAL, HARDWARE_STATS } from '../../utils/apis';
import { Chart } from '../../components/admin/Chart';
import { StatisticItem } from '../../components/admin/StatisticItem';
import { AdminLayout } from '../../components/layouts/AdminLayout';
// Lazy loaded components
const BulbOutlined = dynamic(() => import('@ant-design/icons/BulbOutlined'), {
@@ -123,3 +125,7 @@ export default function HardwareInfo() {
</>
);
}
HardwareInfo.getLayout = function getLayout(page: ReactElement) {
return <AdminLayout page={page} />;
};