-
Notifications
You must be signed in to change notification settings - Fork 0
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 #17 from DDD-Community/feat#14
[feat#16] 로그인 기능 테스트 및 레이아웃 추가
- Loading branch information
Showing
28 changed files
with
1,164 additions
and
1,353 deletions.
There are no files selected for viewing
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,18 +1,8 @@ | ||
// dependencies | ||
import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom" | ||
|
||
// components | ||
import { PoseDetector } from "./components" | ||
import { Router } from "@/routes" | ||
|
||
const App: React.FC = () => { | ||
return ( | ||
<BrowserRouter> | ||
<Routes> | ||
<Route path="/" element={<PoseDetector />} /> | ||
<Route path="*" element={<Navigate to="/" replace />} /> | ||
</Routes> | ||
</BrowserRouter> | ||
) | ||
return <Router></Router> | ||
} | ||
|
||
export default App |
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,49 +1,35 @@ | ||
import React from "react" | ||
import Camera from "./Camera" | ||
import ControlPanel from "./ControlPanel" | ||
|
||
interface CameraContianerProps { | ||
detectStart: (video: HTMLVideoElement) => void | ||
canvasRef: React.LegacyRef<HTMLCanvasElement> | undefined | ||
isModelLoaded: boolean | ||
onChangeTranslation: React.ChangeEventHandler<HTMLInputElement> | ||
} | ||
|
||
export default function CameraContianer(props: CameraContianerProps) { | ||
const { detectStart, canvasRef, isModelLoaded, onChangeTranslation } = props | ||
export default function CameraContianer(props: CameraContianerProps): React.ReactElement { | ||
const { detectStart, canvasRef } = props | ||
return ( | ||
<div | ||
style={{ | ||
display: "flex", | ||
padding: "20px", | ||
width: "100%", | ||
height: "100%", | ||
position: "relative", | ||
}} | ||
> | ||
<div | ||
<Camera onStreamReady={detectStart} /> | ||
<canvas | ||
ref={canvasRef} | ||
width="1280" | ||
height="720" | ||
style={{ | ||
position: "relative", | ||
position: "absolute", | ||
top: 0, | ||
left: 0, | ||
width: "100%", | ||
height: "100%", | ||
}} | ||
> | ||
<Camera onStreamReady={detectStart} /> | ||
<canvas | ||
ref={canvasRef} | ||
width="640" | ||
height="480" | ||
style={{ | ||
position: "absolute", | ||
top: 0, | ||
left: 0, | ||
border: "1px solid black", | ||
}} | ||
/> | ||
</div> | ||
<div | ||
style={{ | ||
paddingLeft: "20px", | ||
width: "150px", | ||
}} | ||
> | ||
{isModelLoaded && <ControlPanel onChangeTranslation={onChangeTranslation} />} | ||
</div> | ||
/> | ||
</div> | ||
) | ||
} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const Login: React.FC = () => { | ||
const REST_API_KEY = "84b401e74d5a879d3fedfa7ba4366c68" | ||
const REDIRECT_URI = "http://localhost:3000/auth" | ||
const link = `https://kauth.kakao.com/oauth/authorize?client_id=${REST_API_KEY}&redirect_uri=${REDIRECT_URI}&response_type=code` | ||
|
||
const loginHandler = (): void => { | ||
window.location.href = link | ||
} | ||
|
||
return ( | ||
<button type="button" onClick={loginHandler}> | ||
로그인 하기 | ||
</button> | ||
) | ||
} | ||
|
||
export default Login |
Oops, something went wrong.