-
Notifications
You must be signed in to change notification settings - Fork 6
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
1 parent
dd36247
commit 98fe190
Showing
1 changed file
with
6 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,10 @@ | ||
import { Status, Wrapper } from '@googlemaps/react-wrapper'; | ||
import Loading from 'components/ui/Loading'; | ||
|
||
import CarFfeineMap from '@map/CarFfeineMap'; | ||
|
||
import NotFound from '@ui/NotFound'; | ||
|
||
const render = (status: Status) => { | ||
switch (status) { | ||
case Status.LOADING: | ||
return <Loading />; | ||
case Status.FAILURE: | ||
return <NotFound />; | ||
case Status.SUCCESS: | ||
return <CarFfeineMap />; | ||
} | ||
}; | ||
|
||
const App = () => { | ||
function App() { | ||
return ( | ||
<Wrapper | ||
apiKey={ | ||
process.env.NODE_ENV === 'production' | ||
? process.env.GOOGLE_MAPS_API_KEY_PROD | ||
: process.env.GOOGLE_MAPS_API_KEY_DEV | ||
} | ||
render={render} | ||
libraries={['marker']} | ||
/> | ||
<div> | ||
<div style={{ fontSize: '20px' }}>서비스 이전중...</div> | ||
<a href="https://dev.carffe.in">개발 서버에서 확인하기 (Click)</a> | ||
</div> | ||
); | ||
}; | ||
} | ||
|
||
export default App; |