We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wireFrame
export const Logout = ({ islogout, setIslogout }: any) => { const logoutHandler = () => { localStorage.clear(); setIslogout(!islogout); const navigate = useNavigate(); navigate('/landing'); }; return ( <LogoutModal> <LogoutSpan>정말 로그아웃 하시겠습니까?</LogoutSpan> <div> <button onClick={setIslogout(!islogout)}>돌아가기</button> <button onClick={logoutHandler}>네</button> </div> </LogoutModal> ); };
<Routes> <Route path="/" element={<LandingPage />} /> <Route path="/signup" element={<SignupPage />} /> <Route path="/confirm" element={<ConfirmPage />} /> <Route path="/enter" element={<EnterInfoPage />} /> <Route element={<Layout />}> <Route element={<Aside islogout={islogout} setIslogout={setIslogout} />}> {islogout ? ( <Route element={<Logout islogout={islogout} setIslogout={setIslogout} />}> <Route path="/dashboard" element={<Dashboard />} /> <Route path="/addasset" element={<AddAsset />} /> <Route path="/modifyasset" element={<ModifyAsset />} /> <Route path="/fix" element={<FixPage />} /> </Route> ) : ( <Route> <Route path="/dashboard" element={<Dashboard />} /> <Route path="/addasset" element={<AddAsset />} /> <Route path="/modifyasset" element={<ModifyAsset />} /> <Route path="/fix" element={<FixPage />} /> </Route> )} </Route> </Route> </Routes>
ismodal 과 setIsModal 을 prop으로 넘겨줘서 관리 하다보니 초기값이 false 이기 때문에 다른 컴포넌트에서 로그아웃 버튼을 눌러도 true 로 바뀌고 다시 false 로 바뀜.'
The text was updated successfully, but these errors were encountered:
feat: Logout 기능 만들기#83
f0d0ad1
wyswhsl21
No branches or pull requests
작업 내용 리스트
이미지
wireFrame
트러블 슈팅
Logout Modal
해당 구현 방식의 문제😒
ismodal 과 setIsModal 을 prop으로 넘겨줘서 관리 하다보니 초기값이 false 이기 때문에 다른 컴포넌트에서 로그아웃 버튼을 눌러도 true 로 바뀌고 다시 false 로 바뀜.'
The text was updated successfully, but these errors were encountered: