-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
1,124 additions
and
236 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// // ../hoc/auth.js | ||
|
||
// import React, { useEffect } from "react"; | ||
// import { useLocation, useNavigate } from "react-router-dom"; | ||
// import { useRecoilState } from "recoil"; | ||
// import { accessTokenState, isAuthenticatedState } from "../recoil/authAtoms"; | ||
|
||
// export default function Auth(SpecificComponent, option, adminRoute = null) { | ||
// function AuthenticationCheck() { | ||
// const navigate = useNavigate(); | ||
// const location = useLocation(); | ||
// const [isAuthenticated, setIsAuthenticated] = | ||
// useRecoilState(isAuthenticatedState); | ||
// const [accessToken, setAccessToken] = useRecoilState(accessTokenState); | ||
|
||
// useEffect(() => { | ||
// // 여기서 적절한 방법으로 사용자의 인증 상태를 확인하고 accessToken을 Recoil 상태에 업데이트합니다. | ||
// // 이 예시에서는 option이 false일 때만 인증 상태를 true로 설정합니다. | ||
// if (!option) { | ||
// setIsAuthenticated(true); | ||
// // 여기서 세션 또는 토큰을 가져와서 Recoil 상태에 업데이트합니다. | ||
// // 이 예시에서는 accessToken을 예시로 사용하고, 실제로는 여러분의 인증 방식에 맞게 수정해야 합니다. | ||
// setAccessToken("exampleAccessToken"); | ||
// } | ||
// }, [option, setIsAuthenticated, setAccessToken]); | ||
|
||
// useEffect(() => { | ||
// // 인증 상태에 따라 페이지 접근을 처리합니다. | ||
// if (!isAuthenticated) { | ||
// // 인증되지 않은 경우 로그인 페이지로 리다이렉트 | ||
// if (location.pathname !== "/kakaologin") { | ||
// navigate("/kakologin", { replace: true }); | ||
// } | ||
// } else if (isAuthenticated && option === false) { | ||
// // 인증된 상태이고 option이 false인 경우 특정 조건에 따라 리다이렉트 | ||
// // 이 예시에서는 특별한 조건이 없으므로 특별한 동작을 추가할 수 있습니다. | ||
// } | ||
// }, [isAuthenticated, option, navigate, location.pathname]); | ||
|
||
// return <SpecificComponent />; | ||
// } | ||
|
||
// return AuthenticationCheck; | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { useEffect, useRef } from "react"; | ||
|
||
function useInterval(callback, delay) { | ||
const savedCallback = useRef(); | ||
|
||
useEffect(() => { | ||
savedCallback.current = callback; | ||
}, [callback]); | ||
|
||
useEffect(() => { | ||
function tick() { | ||
savedCallback.current(); | ||
} | ||
|
||
if (delay !== null) { | ||
const intervalId = setInterval(tick, delay); | ||
return () => clearInterval(intervalId); | ||
} | ||
}, [delay]); | ||
} | ||
|
||
export default useInterval; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
.search-container { | ||
width: 100%; | ||
} | ||
|
||
.search-list { | ||
width: 90%; | ||
margin: 5% auto; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.search-link { | ||
text-decoration: none; | ||
color: black; | ||
} | ||
|
||
.search-details { | ||
display: flex; | ||
flex-direction: row; | ||
margin: 2% 0; | ||
align-items: center; | ||
} | ||
|
||
.search-detail { | ||
align-items: center; | ||
justify-content: space-between; | ||
margin: 0 5%; | ||
} | ||
|
||
.search-status-time { | ||
display: flex; | ||
flex-direction: row; | ||
margin-top: 2%; | ||
} | ||
|
||
.search-name { | ||
color: #000; | ||
font-family: "Bold"; | ||
font-size: 0.875rem; | ||
} | ||
|
||
.search-status { | ||
color: #4f4f4f; | ||
font-family: "Bold"; | ||
font-size: 0.75rem; | ||
} | ||
|
||
.search-time { | ||
color: #000; | ||
font-family: "ExtraLight"; | ||
font-size: 0.75rem; | ||
margin-top: 1.5%; | ||
} | ||
|
||
.search-address { | ||
color: #838383; | ||
font-family: "ExtraLight"; | ||
font-size: 0.75rem; | ||
} |
Oops, something went wrong.