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,7 +1,7 @@
import { Button, Checkbox, Form, Input, Modal, Space, Table, Typography } from 'antd';
import _ from 'lodash';
import dynamic from 'next/dynamic';
import React, { useContext, useEffect, useState } from 'react';
import React, { ReactElement, useContext, useEffect, useState } from 'react';
import { FormStatusIndicator } from '../../components/admin/FormStatusIndicator';
import { ExternalAction } from '../../interfaces/external-action';
import {
@@ -13,6 +13,8 @@ import { createInputStatus, STATUS_ERROR, STATUS_SUCCESS } from '../../utils/inp
import { ServerStatusContext } from '../../utils/server-status-context';
import { isValidUrl, DEFAULT_TEXTFIELD_URL_PATTERN } from '../../utils/urls';
import { AdminLayout } from '../../components/layouts/AdminLayout';
const { Title, Paragraph } = Typography;
// Lazy loaded components
@@ -375,4 +377,8 @@ const Actions = () => {
</div>
);
};
Actions.getLayout = function getLayout(page: ReactElement) {
return <AdminLayout page={page} />;
};
export default Actions;