diff --git a/frontend/public/assets/icons/guestlocationmarker.svg b/frontend/public/assets/icons/guestlocationmarker.svg
deleted file mode 100644
index 94948f20..00000000
--- a/frontend/public/assets/icons/guestlocationmarker.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/frontend/src/assets/character1.png b/frontend/src/assets/character1.png
new file mode 100644
index 00000000..026f12dd
Binary files /dev/null and b/frontend/src/assets/character1.png differ
diff --git a/frontend/src/assets/character2.png b/frontend/src/assets/character2.png
new file mode 100644
index 00000000..143bbaa9
Binary files /dev/null and b/frontend/src/assets/character2.png differ
diff --git a/frontend/src/assets/character3.png b/frontend/src/assets/character3.png
new file mode 100644
index 00000000..04fa89c6
Binary files /dev/null and b/frontend/src/assets/character3.png differ
diff --git a/frontend/src/assets/character4.png b/frontend/src/assets/character4.png
new file mode 100644
index 00000000..fa03e241
Binary files /dev/null and b/frontend/src/assets/character4.png differ
diff --git a/frontend/src/assets/character5.png b/frontend/src/assets/character5.png
new file mode 100644
index 00000000..cdf99c46
Binary files /dev/null and b/frontend/src/assets/character5.png differ
diff --git a/frontend/src/assets/character6.png b/frontend/src/assets/character6.png
new file mode 100644
index 00000000..ae26cf73
Binary files /dev/null and b/frontend/src/assets/character6.png differ
diff --git a/frontend/src/assets/guestlocationmarker.svg b/frontend/src/assets/guestlocationmarker.svg
deleted file mode 100644
index ff1dfffe..00000000
--- a/frontend/src/assets/guestlocationmarker.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/frontend/src/hooks/useRedraw.ts b/frontend/src/hooks/useRedraw.ts
index 84728cb8..908bb6b5 100644
--- a/frontend/src/hooks/useRedraw.ts
+++ b/frontend/src/hooks/useRedraw.ts
@@ -3,8 +3,8 @@ import { LINE_WIDTH, STROKE_STYLE } from '@/lib/constants/canvasConstants.ts';
import startmarker from '@/assets/startmarker.svg';
import endmarker from '@/assets/endmarker.svg';
-import mylocation from '@/assets/mylocation.svg';
-import guestlocationmarker from '@/assets/guestlocationmarker.svg';
+import character1 from '@/assets/character1.png';
+import character2 from '@/assets/character2.png';
interface ILatLng {
lat: number;
@@ -51,8 +51,8 @@ export const useRedrawCanvas = ({
}: IUseRedrawCanvasProps) => {
const startImageRef = useRef(null);
const endImageRef = useRef(null);
- const mylocationRef = useRef(null);
- const guestlocationmarkerRef = useRef(null);
+ const character1Ref = useRef(null);
+ const character2Ref = useRef(null);
useEffect(() => {
startImageRef.current = new Image();
@@ -61,11 +61,11 @@ export const useRedrawCanvas = ({
endImageRef.current = new Image();
endImageRef.current.src = endmarker;
- mylocationRef.current = new Image();
- mylocationRef.current.src = mylocation;
+ character1Ref.current = new Image();
+ character1Ref.current.src = character1;
- guestlocationmarkerRef.current = new Image();
- guestlocationmarkerRef.current.src = guestlocationmarker;
+ character2Ref.current = new Image();
+ character2Ref.current.src = character2;
}, []);
const drawMarker = (
@@ -139,14 +139,14 @@ export const useRedrawCanvas = ({
if (lat && lng) {
const currentLocation = latLngToCanvasPoint({ lat, lng });
- drawMarker(ctx, currentLocation, mylocationRef.current);
+ drawMarker(ctx, currentLocation, character1Ref.current);
}
if (otherLocations) {
otherLocations.forEach(({ location }) => {
// const markerColor = getMarkerColor(token);
const locationPoint = latLngToCanvasPoint(location);
- drawMarker(ctx, locationPoint, guestlocationmarkerRef.current);
+ drawMarker(ctx, locationPoint, character2Ref.current);
});
}
diff --git a/frontend/src/pages/GuestView.tsx b/frontend/src/pages/GuestView.tsx
index 7a48dbab..1d47b191 100644
--- a/frontend/src/pages/GuestView.tsx
+++ b/frontend/src/pages/GuestView.tsx
@@ -22,22 +22,22 @@ export const GuestView = () => {
const location = useLocation();
- const transformTypeGuestEntityToIGuest = (props: guestEntity): IGuest => {
+ const transformTypeGuestEntityToIGuest = (props: guestEntity | undefined): IGuest => {
return {
- id: props.id ?? '',
- name: props.name ?? '',
+ id: props?.id ?? '',
+ name: props?.name ?? '',
// name: '현재 내 위치',
startPoint: {
- lat: props.start_location?.lat ?? 0,
- lng: props.start_location?.lng ?? 0,
+ lat: props?.start_location?.lat ?? 0,
+ lng: props?.start_location?.lng ?? 0,
},
endPoint: {
- lat: props.end_location?.lat ?? 0,
- lng: props.end_location?.lng ?? 0,
+ lat: props?.end_location?.lat ?? 0,
+ lng: props?.end_location?.lng ?? 0,
},
- paths: (props.path as IPoint[]) ?? [],
+ paths: (props?.path as IPoint[]) ?? [],
markerStyle: {
- color: props.marker_style?.color ?? '',
+ color: props?.marker_style?.color ?? '',
},
};
};
@@ -46,7 +46,7 @@ export const GuestView = () => {
getGuestInfo(channelId, userId)
.then(res => {
if (!res.data) throw new Error('🚀 Fetch Error: responsed undefined');
- const transfromedData = transformTypeGuestEntityToIGuest(res.data);
+ const transfromedData = transformTypeGuestEntityToIGuest(res.data.guest);
setGuestInfo(transfromedData);
})
.catch((err: any) => {