diff --git a/client/src/components/Header.tsx b/client/src/components/Header.tsx index dfd5217..d3d5ac5 100644 --- a/client/src/components/Header.tsx +++ b/client/src/components/Header.tsx @@ -57,6 +57,7 @@ const Header: FC<{}> = () => { {jwtData && jwt && ( ユーザー設定 + 更新届提出 {jwtData.groups.includes("manager") && ( ユーザー管理 diff --git a/client/src/pages/update.tsx b/client/src/pages/update.tsx new file mode 100644 index 0000000..7235820 --- /dev/null +++ b/client/src/pages/update.tsx @@ -0,0 +1,31 @@ +import { FC, useEffect, useState } from "react"; +import { Container } from "react-bootstrap"; +import jwt_decode from "jwt-decode"; + +const UpdatePage: FC<{}> = () => { + const [jwt, setJwt] = useState(null); + const [jwtData, setJwtData] = useState(""); + + useEffect(() => { + if (!jwt) return; + const decoded: any = jwt_decode(jwt); + setJwtData(decoded); + }, [jwt]); + + useEffect(() => { + const token = localStorage.getItem("token"); + if (!token) return; + setJwt(token); + }, []); + + return ( + <> + +

更新届提出

+

2024年度の更新届は以下のリンクから提出してください

+ 2024年度入部/更新届 +
+ + ); +}; +export default UpdatePage; \ No newline at end of file