File tree 2 files changed +32
-0
lines changed
2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ const Header: FC<{}> = () => {
57
57
{ jwtData && jwt && (
58
58
< NavDropdown title = { jwtData . uid } align = "end" >
59
59
< NavDropdown . Item href = "/user" > ユーザー設定</ NavDropdown . Item >
60
+ < NavDropdown . Item href = "/update" > 更新届提出</ NavDropdown . Item >
60
61
{ jwtData . groups . includes ( "manager" ) && (
61
62
< NavDropdown . Item href = "/admin" >
62
63
ユーザー管理
Original file line number Diff line number Diff line change
1
+ import { FC , useEffect , useState } from "react" ;
2
+ import { Container } from "react-bootstrap" ;
3
+ import jwt_decode from "jwt-decode" ;
4
+
5
+ const UpdatePage : FC < { } > = ( ) => {
6
+ const [ jwt , setJwt ] = useState < string | null > ( null ) ;
7
+ const [ jwtData , setJwtData ] = useState < any > ( "" ) ;
8
+
9
+ useEffect ( ( ) => {
10
+ if ( ! jwt ) return ;
11
+ const decoded : any = jwt_decode ( jwt ) ;
12
+ setJwtData ( decoded ) ;
13
+ } , [ jwt ] ) ;
14
+
15
+ useEffect ( ( ) => {
16
+ const token = localStorage . getItem ( "token" ) ;
17
+ if ( ! token ) return ;
18
+ setJwt ( token ) ;
19
+ } , [ ] ) ;
20
+
21
+ return (
22
+ < >
23
+ < Container >
24
+ < h1 > 更新届提出</ h1 >
25
+ < p > 2024年度の更新届は以下のリンクから提出してください</ p >
26
+ < a href = { "https://docs.google.com/forms/d/e/1FAIpQLSftFmyVdufKYXa0VoDBmjlN5-dlMy5__yLKVMe5fgCHJ4ErWg/viewform?usp=pp_url&entry.800787902=" + jwtData . uid } > 2024年度入部/更新届</ a >
27
+ </ Container >
28
+ </ >
29
+ ) ;
30
+ } ;
31
+ export default UpdatePage ;
You can’t perform that action at this time.
0 commit comments