feat: 修改部分文案及删除多余内容

This commit is contained in:
秋水浮尘
2023-11-14 00:52:40 +08:00
parent 13f794caea
commit 3218fccf7c
15 changed files with 702 additions and 773 deletions

View File

@@ -1,20 +1,30 @@
import { useEffect, memo } from 'react';
import './App.less';
import { useLocation, useNavigate, Outlet } from 'react-router-dom';
import Header from '@views/header'
import { memo, useEffect } from 'react'
import { Outlet, useLocation, useNavigate } from 'react-router-dom'
import './App.less'
const App = () => {
const location = useLocation();
const location = useLocation()
const navigate = useNavigate()
useEffect(() => {
if (location.pathname === '/') {
const userInfoStorage = localStorage.getItem('userInfo')
if (!userInfoStorage) {
return window.location.replace('/login')
}
navigate('/question-bank')
}
}, [location])
return (
<div className="app-main" style={{ padding: location.pathname === '/login' ? '66px 0 0' : '66px 16px 32px' }}>
<div
className='app-main'
style={{ padding: location.pathname === '/login' ? '66px 0 0' : '66px 16px 32px' }}
>
<Header />
<div className='content-box' style={{ width: location.pathname === '/login' ? '100%' : '1439px' }}>
<div
className='content-box'
style={{ width: location.pathname === '/login' ? '100%' : '1439px' }}
>
<Outlet />
</div>
</div>