mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-06-20 17:22:48 +08:00
部门报错优化
This commit is contained in:
parent
7f4a08f7a4
commit
d9d3be1434
@ -30,6 +30,7 @@ export const Header: React.FC = () => {
|
||||
const [currentNav, serCurrentNav] = useState(location.pathname);
|
||||
|
||||
useEffect(() => {
|
||||
if (departments.length > 0) {
|
||||
setCurrentDepartment(departments[0].name);
|
||||
const arr: any = [
|
||||
{
|
||||
@ -47,6 +48,7 @@ export const Header: React.FC = () => {
|
||||
});
|
||||
});
|
||||
setDepartmentsMenu(arr);
|
||||
}
|
||||
}, [departments]);
|
||||
|
||||
const onClick: MenuProps["onClick"] = ({ key }) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user