-
Notifications
You must be signed in to change notification settings - Fork 5
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 #116 from boostcamp-2020/dev
2주차 배포
- Loading branch information
Showing
74 changed files
with
4,514 additions
and
582 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
import React from 'react'; | ||
import { Route, Switch } from 'react-router-dom'; | ||
import Main from './pages/Main'; | ||
import Entry from './pages/Entry'; | ||
|
||
/** 추후에 라우팅해야되면 수정할 예정 */ | ||
function App(): React.ReactElement { | ||
return <Main />; | ||
return ( | ||
<Switch> | ||
<Route path="/" exact component={Entry} /> | ||
<Route path="/map" component={Main} /> | ||
</Switch> | ||
); | ||
} | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React from 'react'; | ||
import styled from '../utils/styles/styled'; | ||
import useCanvas from '../hooks/useCanvas'; | ||
|
||
const Canvas = styled.canvas``; | ||
|
||
const Img = styled.img` | ||
display: none; | ||
`; | ||
|
||
const CANVAS_WIDTH = 804; | ||
const CANVAS_HEIGHT = 420; | ||
|
||
function CanvasComponent(): React.ReactElement { | ||
const { mapImgRef, logoImgRef, canvasRef, mouseDownHandler } = useCanvas(); | ||
|
||
return ( | ||
<> | ||
<Img | ||
src="/images/map.png" | ||
alt="map" | ||
crossOrigin="anonymous" | ||
ref={mapImgRef} | ||
/> | ||
<Img | ||
src="/images/logo.png" | ||
alt="logo" | ||
crossOrigin="anonymous" | ||
ref={logoImgRef} | ||
/> | ||
<Canvas | ||
onMouseDown={mouseDownHandler} | ||
width={CANVAS_WIDTH} | ||
height={CANVAS_HEIGHT} | ||
ref={canvasRef} | ||
/> | ||
</> | ||
); | ||
} | ||
|
||
export default CanvasComponent; |
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
Oops, something went wrong.