-
Notifications
You must be signed in to change notification settings - Fork 2
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
14 changed files
with
133 additions
and
74 deletions.
There are no files selected for viewing
Binary file not shown.
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 |
---|---|---|
|
@@ -24,7 +24,6 @@ export const getBoardPostSearch = async ({ | |
q: q, | ||
}, | ||
}); | ||
console.log(response); | ||
|
||
return response.data; | ||
}; |
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
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
40 changes: 40 additions & 0 deletions
40
src/pages/kakao/redirect/containers/RegisterButtonSection.tsx
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,40 @@ | ||
import { KakaoButton } from '@/components/Logo/KakaoButton'; | ||
|
||
const rest_api_key = import.meta.env.VITE_REST_API_KEY; | ||
const redirect_uri = import.meta.env.VITE_REDIRECT_URI; | ||
const baseUrl = `${window.location.protocol}//${window.location.host}/`; | ||
const TAG = ['ussum_001', 'ussum_002', 'ussum_003']; | ||
|
||
interface type { | ||
subServiceUrl: string; | ||
} | ||
|
||
export function RegisterButtonSection({ subServiceUrl }: type) { | ||
const KAKAO_AUTH_URL = `https://kauth.kakao.com/oauth/authorize?response_type=code&client_id=${rest_api_key}&redirect_uri=${baseUrl}${redirect_uri}&service_terms=${TAG}&subServiceUrl=${subServiceUrl}`; | ||
|
||
console.log(KAKAO_AUTH_URL); | ||
|
||
const handleLogin = () => { | ||
window.location.href = KAKAO_AUTH_URL; | ||
}; | ||
|
||
return ( | ||
<div | ||
style={{ | ||
minHeight: '0vh', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
justifyContent: 'flex-end', | ||
overflowY: 'hidden', | ||
}} | ||
> | ||
<div className="flex flex-col items-center text-center"> | ||
<h1 className="mb-[-10px] text-xs font-normal">제64대 총학생회</h1> | ||
<h1 className="text-[56px] font-bold">US:SUM</h1> | ||
<div onClick={handleLogin}> | ||
<KakaoButton /> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
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,30 @@ | ||
import { State } from '@/containers/common/Header/const/state'; | ||
import { Header } from '@/containers/common/Header/Header'; | ||
import { RegisterTextSection } from '@/pages/kakao/containers/RegisterTextSection'; | ||
import { RegisterButtonSection } from './containers/RegisterButtonSection'; | ||
import { useParams } from 'react-router-dom'; | ||
|
||
export function KakaoRegisterRedirectPage() { | ||
let { redirect_url } = useParams(); | ||
|
||
if (redirect_url === undefined) { | ||
redirect_url = 'https://ssuketch60.cafe24.com/'; | ||
} | ||
|
||
return ( | ||
<> | ||
<Header state={State.Onboarding} /> | ||
<div className="relative h-screen overflow-hidden"> | ||
<div className="top-1/5 pointer-events-none absolute left-1/2 mt-[100px] -translate-x-1/2 -translate-y-1/2 transform"> | ||
<RegisterTextSection /> | ||
</div> | ||
<div className="z-99 absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform"> | ||
<RegisterButtonSection subServiceUrl={redirect_url} /> | ||
</div> | ||
<div className="pointer-events-none absolute left-1/2 top-full mt-[-100px] -translate-x-1/2 -translate-y-1/2 transform"> | ||
<RegisterTextSection /> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
} |
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
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