-
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.
Merge pull request #38 from KimCookieYa/dev
[FE] 1차 종이배 핸드셰이킹 구현
- Loading branch information
Showing
15 changed files
with
136 additions
and
40 deletions.
There are no files selected for viewing
Empty file.
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,12 @@ | ||
[32m[VERIFIER][39m [33mInfo[39m 5/6/2024, 8:05:01 AM [33m[RoutesResolver][39m [32mVerifierAPIController {/api/verifier}:[39m | ||
[32m[VERIFIER][39m [33mInfo[39m 5/6/2024, 8:05:01 AM [33m[RouterExplorer][39m [32mMapped {/api/verifier/verify-proof, POST} route[39m | ||
[32m[VERIFIER][39m [33mInfo[39m 5/6/2024, 8:05:01 AM [33m[NestApplication][39m [32mNest application successfully started[39m | ||
[32m[VERIFIER][39m [33mInfo[39m 5/6/2024, 8:05:03 AM [33m[RoutesResolver][39m [32mVerifierAPIController {/api/verifier}:[39m | ||
[32m[VERIFIER][39m [33mInfo[39m 5/6/2024, 8:05:03 AM [33m[RouterExplorer][39m [32mMapped {/api/verifier/verify-proof, POST} route[39m | ||
[32m[VERIFIER][39m [33mInfo[39m 5/6/2024, 8:05:03 AM [33m[NestApplication][39m [32mNest application successfully started[39m | ||
[32m[VERIFIER][39m [33mInfo[39m 5/6/2024, 10:53:49 AM [33m[RoutesResolver][39m [32mVerifierAPIController {/api/verifier}:[39m | ||
[32m[VERIFIER][39m [33mInfo[39m 5/6/2024, 10:53:49 AM [33m[RouterExplorer][39m [32mMapped {/api/verifier/verify-proof, POST} route[39m | ||
[32m[VERIFIER][39m [33mInfo[39m 5/6/2024, 10:53:49 AM [33m[NestApplication][39m [32mNest application successfully started[39m | ||
[32m[VERIFIER][39m [33mInfo[39m 5/6/2024, 4:47:21 PM [33m[RoutesResolver][39m [32mVerifierAPIController {/api/verifier}:[39m | ||
[32m[VERIFIER][39m [33mInfo[39m 5/6/2024, 4:47:21 PM [33m[RouterExplorer][39m [32mMapped {/api/verifier/verify-proof, POST} route[39m | ||
[32m[VERIFIER][39m [33mInfo[39m 5/6/2024, 4:47:21 PM [33m[NestApplication][39m [32mNest application successfully started[39m |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,30 @@ | ||
'use client'; | ||
|
||
import useUserInfoStore from '@/stores/useUserInfoStore'; | ||
import { useRouter } from 'next/navigation'; | ||
import { useEffect } from 'react'; | ||
import { useToast } from '@/stores/useToastStore'; | ||
|
||
export default function LandingLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
const userInfo = useUserInfoStore((state) => state.userInfo); | ||
const openToast = useToast((state) => state.openToast); | ||
const router = useRouter(); | ||
|
||
useEffect( | ||
function checkLoginEffect() { | ||
console.log('userInfo: ', userInfo); | ||
if (userInfo) { | ||
openToast('로그인됨', 'error', () => { | ||
router.push('/pond'); | ||
}); | ||
} | ||
}, | ||
[userInfo] | ||
); | ||
|
||
return <>{children}</>; | ||
} |
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
18 changes: 18 additions & 0 deletions
18
FE/service-homepage/src/app/api/user/verify-proof/route.ts
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,18 @@ | ||
import getSession from '@/lib/session'; | ||
import { NextRequest, NextResponse } from 'next/server'; | ||
import serverAxios, { apiHandler } from '@/lib/server-axios'; | ||
|
||
export const POST = apiHandler(async (req: NextRequest) => { | ||
const session = await getSession(); | ||
const userPk = session.userPk; | ||
const { proof } = await req.json(); | ||
const res = await serverAxios.post(`/match-log/v1/send/my-label`, { | ||
userPk, | ||
proof, | ||
}); | ||
|
||
return NextResponse.json({ | ||
result: res.data.statusCode, | ||
data: res.data.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