Skip to content

Commit

Permalink
Merge pull request #262 from boostcampwm-2024/feature/fe/#260-mapInMa…
Browse files Browse the repository at this point in the history
…inView

[FE][Feat] #260 : 홈화면에 지도-캔버스 연동된 화면 노출
  • Loading branch information
effozen authored Nov 25, 2024
2 parents d41adbe + d8c1329 commit 3629892
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/assets/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<title>선따라 길따라 - DDara</title>
</head>
<body>
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/App.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#root {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
touch-action: pan-y;
}

.logo {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { IndexRoutes } from '@/routes/IndexRoutes.tsx';
import 'App.css';

export const App = () => <IndexRoutes />;
5 changes: 4 additions & 1 deletion frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
License: none (public domain)
*/

*,
* {
overscroll-behavior: none;
overscroll-behavior-y: none;
}
*::before,
*::after {
margin: 0;
Expand Down
19 changes: 10 additions & 9 deletions frontend/src/pages/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { MdFormatListBulleted } from 'react-icons/md';
import { FooterContext } from '@/component/layout/footer/LayoutFooterProvider';
import { useNavigate } from 'react-router-dom';
import { buttonActiveType } from '@/component/layout/enumTypes';
import { MapProviderForDraw } from '@/component/canvasWithMap/MapProviderForDraw.tsx';
import { BottomSheet } from '@/component/bottomsheet/BottomSheet.tsx';
import { Content } from '@/component/content/Content.tsx';
import { loadLocalData, saveLocalData } from '@/utils/common/manageLocalData.ts';
import { AppConfig } from '@/lib/constants/commonConstants.ts';
import { v4 as uuidv4 } from 'uuid';
import { getUserLocation } from '@/hooks/getUserLocation.ts';
import { MapCanvasForView } from '@/component/canvasWithMap/canvasWithMapForView/MapCanvasForView.tsx';

const contentData = [
{
Expand Down Expand Up @@ -84,23 +84,24 @@ export const Main = () => {
setFooterActive(buttonActiveType.ACTIVE);
}, []);
return (
<div className="flex h-screen flex-col">
<div className="flex flex-col overflow-hidden">
<header className="absolute left-0 right-0 top-0 z-10 flex p-4">
<button type="button" className="text-gray-700">
<MdFormatListBulleted size={24} />
</button>
</header>

<main
className="relative flex-grow"
style={{
height: `calc(100% - ${MIN_HEIGHT * 100}%)`,
}}
>
<main className="absolute h-full w-screen flex-grow overflow-hidden">
{/* eslint-disable-next-line no-nested-ternary */}
{lat && lng ? (
otherLocations ? (
<MapProviderForDraw width={window.innerWidth} height={window.innerHeight} />
<MapCanvasForView
width="100%"
height="100%"
lat={lat}
lng={lng}
otherLocations={otherLocations}
/>
) : (
<section className="flex h-full items-center justify-center">
Loading map data...
Expand Down

0 comments on commit 3629892

Please sign in to comment.