Skip to content
Open
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
19 changes: 15 additions & 4 deletions src/pages/editMeetingPage.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
// import React from "react";
import { useRef } from "react";
import { useNavigate } from "react-router-dom";
// import StepFormLayout from "@/shared/ui/StepFormLayout";
import EditMeetingForm from "@/widgets/meeting/editMeetingForm";

import EditMeetingForm, {
type EditMeetingFormRef,
} from "@/widgets/meeting/editMeetingForm";
import AnimatedPageLayout from "@/shared/layout";
import StepNavigation from "@/widgets/common/stepNavigation";
import { useMeetingStore } from "@/store/meetingStore";

const EditMeetingPage = () => {
const navigate = useNavigate();
const { setStartPoint } = useMeetingStore();
const editFormRef = useRef<EditMeetingFormRef>(null);

const handleSave = () => {
if (editFormRef.current) {
const filteredDepartures = editFormRef.current.getFilteredDepartures();
setStartPoint(filteredDepartures);
}

navigate("/Plaza/step1_6");
};

Expand All @@ -31,7 +42,7 @@ const EditMeetingPage = () => {
msOverflowStyle: "none",
}}
>
<EditMeetingForm />
<EditMeetingForm ref={editFormRef} />
</main>

<div className="w-full pt-4">
Expand Down
22 changes: 14 additions & 8 deletions src/pages/step3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ import IconActivity from "/src/shared/asset/icon/activity.svg?react";
import IconBar from "/src/shared/asset/icon/bar.svg?react";
import { IconMinus, IconDragHandle } from "@/shared/ui/svg";
import clsx from "clsx";

import restaurantIconUrl from "/src/shared/asset/icon/restaurant.svg";
import cafeIconUrl from "/src/shared/asset/icon/cafe.svg";
import activityIconUrl from "/src/shared/asset/icon/activity.svg";
import barIconUrl from "/src/shared/asset/icon/bar.svg";
const StoreDetailModal = ({
storeId,
isOpen,
Expand Down Expand Up @@ -268,9 +271,12 @@ const MapComponent = ({
const getMapCenter = () => {
if (!places || places.length === 0)
return new navermaps.LatLng(37.5665, 126.978);
const latSum = places.reduce((sum, p) => sum + p.placelati, 0);
const lngSum = places.reduce((sum, p) => sum + p.placelong, 0);
return new navermaps.LatLng(latSum / places.length, lngSum / places.length);
const latSum = currentCoursePlaces.reduce((sum, p) => sum + p.placelati, 0);
const lngSum = currentCoursePlaces.reduce((sum, p) => sum + p.placelong, 0);
return new navermaps.LatLng(
latSum / currentCoursePlaces.length,
lngSum / currentCoursePlaces.length
);
};

const createMarkerIcon = (place: RecommendedPlace, index: number) => {
Expand Down Expand Up @@ -544,10 +550,10 @@ const Step3_Page = () => {
};

const categoryIconPaths = {
음식점: "/src/shared/asset/icon/restaurant.svg",
카페: "/src/shared/asset/icon/cafe.svg",
액티비티: "/src/shared/asset/icon/activity.svg",
술집: "/src/shared/asset/icon/bar.svg",
음식점: restaurantIconUrl,
카페: cafeIconUrl,
액티비티: activityIconUrl,
술집: barIconUrl,
};

const categoryMapping: { [key: string]: string } = {
Expand Down
Loading