Make each admin page specify is own layout. Closes #2584
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable @next/next/no-css-tags */
|
||||
import React, { useState, useEffect, useContext } from 'react';
|
||||
import React, { useState, useEffect, useContext, ReactElement } from 'react';
|
||||
import { Skeleton, Card, Statistic, Row, Col } from 'antd';
|
||||
import { formatDistanceToNow, formatRelative } from 'date-fns';
|
||||
import dynamic from 'next/dynamic';
|
||||
@@ -12,6 +12,8 @@ import { LOGS_WARN, fetchData, FETCH_INTERVAL } from '../../utils/apis';
|
||||
import { formatIPAddress, isEmptyObject } from '../../utils/format';
|
||||
import { NewsFeed } from '../../components/admin/NewsFeed';
|
||||
|
||||
import { AdminLayout } from '../../components/layouts/AdminLayout';
|
||||
|
||||
// Lazy loaded components
|
||||
|
||||
const UserOutlined = dynamic(() => import('@ant-design/icons/UserOutlined'), {
|
||||
@@ -189,3 +191,7 @@ export default function Home() {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Home.getLayout = function getLayout(page: ReactElement) {
|
||||
return <AdminLayout page={page} />;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user