Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FE][Fix] #224 : Frontend 버그 수정 #238

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend/src/component/canvas/CanvasWithMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ interface ICanvasWithMapProps {
lng: number;
zoom: number;
mapType: string;
allowCanvas?: boolean;
}

interface IMouseEventState {
Expand Down Expand Up @@ -99,7 +100,7 @@ export const CanvasWithMap = (props: ICanvasWithMapProps) => {
onMouseMove={handleMouseMove}
onMouseUp={handleMouseUp}
>
<Canvas ref={canvasRefMethods} />
{props.allowCanvas && <Canvas ref={canvasRefMethods} />}
<Map
lat={props.lat}
lng={props.lng}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/GuestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ export const GuestView = () => {
}, []);

// TODO: geoCoding API를 이용해서 현재 위치나 시작위치를 기반으로 자동 좌표 설정 구현 (현재: 하드코딩)
return <CanvasWithMap lat={37.3595704} lng={127.105399} zoom={21} mapType="naver" />;
return <CanvasWithMap lat={37.3595704} lng={127.105399} zoom={21} mapType="naver" allowCanvas />;
};
4 changes: 2 additions & 2 deletions frontend/src/pages/Main.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Fragment, useContext, useState } from 'react';
import { getUserLocation } from '@/hooks/getUserLocation';
import { Map } from '@/component/maps/Map';
import { BottomSheet } from '@/component/bottomsheet/BottomSheet';
import { Content } from '@/component/content/Content';
import { MdFormatListBulleted } from 'react-icons/md';
import { FooterContext } from '@/component/layout/footer/LayoutFooterProvider';
import { useNavigate } from 'react-router-dom';
import { CanvasWithMap } from '@/component/canvas/CanvasWithMap.tsx';

const contentData = [
{
Expand Down Expand Up @@ -62,7 +62,7 @@ export const Main = () => {
}}
>
{lat && lng ? (
<Map lat={lat} lng={lng} type="naver" />
<CanvasWithMap lat={lat} lng={lng} zoom={20} mapType="naver" />
) : (
<section className="flex h-full items-center justify-center">
{error ? `Error: ${error}` : 'Loading'}
Expand Down
Loading