mirror of https://gitee.com/answerdev/answer.git
refactor: tidy all constants to commom/constants
This commit is contained in:
parent
bb8f0647a6
commit
5e61ece028
|
@ -34,3 +34,25 @@ export const ADMIN_LIST_STATUS = {
|
|||
name: 'deleted',
|
||||
},
|
||||
};
|
||||
|
||||
export const ADMIN_NAV_MENUS = [
|
||||
{
|
||||
name: 'dashboard',
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
name: 'contents',
|
||||
child: [{ name: 'questions' }, { name: 'answers' }],
|
||||
},
|
||||
{
|
||||
name: 'users',
|
||||
},
|
||||
{
|
||||
name: 'flags',
|
||||
// badgeContent: 5,
|
||||
},
|
||||
{
|
||||
name: 'settings',
|
||||
child: [{ name: 'general' }, { name: 'interface' }],
|
||||
},
|
||||
];
|
|
@ -18,7 +18,7 @@ import {
|
|||
BaseUserCard,
|
||||
Empty,
|
||||
} from '@answer/components';
|
||||
import { ADMIN_LIST_STATUS } from '@answer/common';
|
||||
import { ADMIN_LIST_STATUS } from '@answer/common/constants';
|
||||
import { useEditStatusModal } from '@answer/hooks';
|
||||
|
||||
import * as Type from '@/services/types';
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
BaseUserCard,
|
||||
Empty,
|
||||
} from '@answer/components';
|
||||
import { ADMIN_LIST_STATUS } from '@answer/common';
|
||||
import { ADMIN_LIST_STATUS } from '@answer/common/constants';
|
||||
import { useEditStatusModal, useReportModal } from '@answer/hooks';
|
||||
import { questionDelete } from '@answer/services/api';
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
|
||||
import { AccordionNav } from '@answer/components';
|
||||
|
||||
import { ADMIN_NAV_MENUS } from '@/pages/Admin/admin.constants';
|
||||
import { ADMIN_NAV_MENUS } from '@answer/common/constants';
|
||||
import '../index.scss';
|
||||
|
||||
const UserOverview: FC = () => {
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
export const ADMIN_NAV_MENUS = [
|
||||
{
|
||||
name: 'dashboard',
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
name: 'contents',
|
||||
child: [{ name: 'questions' }, { name: 'answers' }],
|
||||
},
|
||||
{
|
||||
name: 'users',
|
||||
},
|
||||
{
|
||||
name: 'flags',
|
||||
// badgeContent: 5,
|
||||
},
|
||||
{
|
||||
name: 'settings',
|
||||
child: [{ name: 'general' }, { name: 'interface' }],
|
||||
},
|
||||
];
|
|
@ -5,7 +5,7 @@ import { Outlet } from 'react-router-dom';
|
|||
|
||||
import { AccordionNav, PageTitle } from '@answer/components';
|
||||
|
||||
import { ADMIN_NAV_MENUS } from '@/pages/Admin/admin.constants';
|
||||
import { ADMIN_NAV_MENUS } from '@answer/common/constants';
|
||||
|
||||
import './index.scss';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { LOGIN_NEED_BACK } from '@answer/common';
|
||||
import { LOGIN_NEED_BACK } from '@answer/common/constants';
|
||||
|
||||
import Storage from './storage';
|
||||
|
||||
|
|
Loading…
Reference in New Issue