Skip to content

Commit

Permalink
fix: revise message error (#1662)
Browse files Browse the repository at this point in the history
* use GraphQL CodeGen interface in contestsite

* contest_team_member graphql

* fix: 环境变量bug

* revise team_leader_uuid

* delete console.log

* revise message error

---------

Co-authored-by: FranGuam <[email protected]>
Co-authored-by: xiangmy21 <[email protected]>
  • Loading branch information
3 people authored Mar 17, 2024
1 parent 6f1671c commit f4c86ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/app/Components/Authenticate.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React, { useEffect } from "react";
import { Navigate } from "react-router-dom";
import Forbidden from "./Forbidden";
import { message } from "antd";
Expand All @@ -20,8 +20,13 @@ const Authenticate: React.FC<AuthenticateProps> = ({
children,
fallback,
}) => {
useEffect(() => {
if (!user) {
message.info({ content: "请先登录", key: "loginMessage" });
}
});

if (!user) {
message.info("请先登录");
return <Navigate to="/user/login" />;
}

Expand Down
1 change: 1 addition & 0 deletions src/app/ShareSite/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const ShareSite: React.FC<PageProps> = ({ mode, user }) => {

const StyledMenu = styled(Menu)`
&.ant-menu {
width: 100%;
line-height: 48px;
border-bottom: unset;
}
Expand Down

0 comments on commit f4c86ed

Please sign in to comment.