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