diff --git a/frontend/public/assets/icons/flag.svg b/frontend/public/assets/icons/flag2.svg similarity index 100% rename from frontend/public/assets/icons/flag.svg rename to frontend/public/assets/icons/flag2.svg diff --git a/frontend/src/component/IconGuide/GuestMarker.tsx b/frontend/src/component/IconGuide/GuestMarker.tsx new file mode 100644 index 00000000..5759db71 --- /dev/null +++ b/frontend/src/component/IconGuide/GuestMarker.tsx @@ -0,0 +1,33 @@ +import { MdAssistantNavigation, MdFlag, MdLocationOn } from 'react-icons/md'; +import { IconContext } from 'react-icons'; +import { ReactNode, useMemo } from 'react'; + +interface IMarkerData { + name: string; + icon: ReactNode; +} + +export const GusetMarker = () => { + const markerData: IMarkerData[] = [ + { name: '내 위치', icon: }, + { name: '도착지', icon: }, + { name: '출발지', icon: }, + ]; + + const iconContextValue = useMemo(() => ({ color: 'purple', className: 'size-5' }), []); + + return ( +
+
    + + {markerData.map(data => ( +
  • + {data.icon} + {data.name} +
  • + ))} +
    +
+
+ ); +}; diff --git a/frontend/src/component/IconGuide/HostMarker.tsx b/frontend/src/component/IconGuide/HostMarker.tsx new file mode 100644 index 00000000..54721b7c --- /dev/null +++ b/frontend/src/component/IconGuide/HostMarker.tsx @@ -0,0 +1,21 @@ +import { MdAssistantNavigation } from 'react-icons/md'; +import { IGuestData } from '@/types/channel.types.ts'; + +interface IUserMarkerProps { + userData: IGuestData[]; +} + +export const HostMarker = (props: IUserMarkerProps) => { + return ( +
+
    + {props.userData.map(data => ( +
  • + + {data.name} +
  • + ))} +
+
+ ); +}; diff --git a/frontend/src/component/userMarker/UserMarker.tsx b/frontend/src/component/userMarker/UserMarker.tsx deleted file mode 100644 index 2aeb209b..00000000 --- a/frontend/src/component/userMarker/UserMarker.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { MdLocationOn } from 'react-icons/md'; -import { IGuestData } from '@/types/channel.types.ts'; - -interface IUserMarkerProps { - userData: IGuestData[]; -} - -export const UserMarker = (props: IUserMarkerProps) => { - return ( -
-
    - {props.userData.map(data => ( -
  • - - {data.name} -
  • - ))} -
-
- ); -}; diff --git a/frontend/src/pages/GuestView.tsx b/frontend/src/pages/GuestView.tsx index 5ced4c97..24e4a6c7 100644 --- a/frontend/src/pages/GuestView.tsx +++ b/frontend/src/pages/GuestView.tsx @@ -5,7 +5,7 @@ import { useLocation } from 'react-router-dom'; import { MapCanvasForView } from '@/component/canvasWithMap/canvasWithMapForView/MapCanvasForView.tsx'; import { IPoint } from '@/lib/types/canvasInterface.ts'; import { guestEntity } from '@/api/dto/channel.dto.ts'; -// import { UserMarker } from '@/component/userMarker/UserMarker.tsx'; +import { GusetMarker } from '@/component/IconGuide/GuestMarker.tsx'; export const GuestView = () => { const [guestInfo, setGuestInfo] = useState({ @@ -73,7 +73,7 @@ export const GuestView = () => { return (
- {/* */} + {component}
); diff --git a/frontend/src/pages/HostView.tsx b/frontend/src/pages/HostView.tsx index c1c2d36e..abdb80a6 100644 --- a/frontend/src/pages/HostView.tsx +++ b/frontend/src/pages/HostView.tsx @@ -6,7 +6,7 @@ import { useLocation } from 'react-router-dom'; import { MapCanvasForView } from '@/component/canvasWithMap/canvasWithMapForView/MapCanvasForView.tsx'; import { IGuestDataInMapProps, IPoint } from '@/lib/types/canvasInterface.ts'; import { getChannelResEntity, guestEntity } from '@/api/dto/channel.dto.ts'; -import { UserMarker } from '@/component/userMarker/UserMarker.tsx'; +import { HostMarker } from '@/component/IconGuide/HostMarker.tsx'; export const HostView = () => { const [channelInfo, setChannelInfo] = useState(); @@ -102,7 +102,7 @@ export const HostView = () => { return (
- + {component}
);