File tree Expand file tree Collapse file tree 1 file changed +2
-20
lines changed Expand file tree Collapse file tree 1 file changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -347,32 +347,14 @@ const RepoLists = () => {
347347} ;
348348
349349function NoLogginErrorAlert ( ) {
350- const nevigate = useNavigate ( ) ;
351- const [ seconds , setSeconds ] = useState < number | null > ( 3 ) ;
352-
353- useEffect ( ( ) => {
354- if ( seconds === 0 ) {
355- setSeconds ( null ) ;
356- nevigate ( "/login" ) ;
357- return ;
358- }
359- if ( seconds === null ) return ;
360-
361- const timer = setTimeout ( ( ) => {
362- setSeconds ( ( prev ) => prev ! - 1 ) ;
363- } , 1000 ) ;
364-
365- return ( ) => clearTimeout ( timer ) ;
366- } , [ nevigate , seconds ] ) ;
367-
368350 return (
369351 < Box sx = { { maxWidth : "sm" , alignItems : "center" , m : "auto" } } >
370352 < Alert severity = "error" >
371- Please login first! Automatically jump to { " " }
353+ Please{ " " }
372354 < Link component = { ReactLink } to = "/login" >
373355 login
374356 </ Link > { " " }
375- page in { seconds } seconds.
357+ first!
376358 </ Alert >
377359 </ Box >
378360 ) ;
You can’t perform that action at this time.
0 commit comments