Skip to content
Snippets Groups Projects
Commit dc25dd4f authored by pjookim's avatar pjookim
Browse files

refactor: update index.html title, remove unused logos, and enhance AddPlace and MyTrip components

parent e40412f2
Branches
No related tags found
No related merge requests found
......@@ -5,10 +5,6 @@
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<link rel="stylesheet" href="%PUBLIC_URL%/reset.css" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
......@@ -26,7 +22,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>FESTIVELO</title>
</head>
<body>
......
public/logo192.png

5.22 KiB

public/logo512.png

9.44 KiB

......@@ -473,12 +473,10 @@ const AddPlace = ({ tripId, day, onBack, onPlaceSelect, tripStartDate, tripEndDa
e.stopPropagation();
try {
// 현재 day의 plans 정보 가져오기
const tripResponse = await axios.get(`${API_URL}/api/trips/trips/${tripId}`);
const currentTrip = tripResponse.data;
const currentDayPlans = currentTrip.plans[day] || { places: [], route: [] };
// 새로운 place 객체 생성
const newPlace = {
id: place.id,
type: place.type || 12,
......@@ -487,7 +485,6 @@ const AddPlace = ({ tripId, day, onBack, onPlaceSelect, tripStartDate, tripEndDa
coordinates: place.coordinates
};
// 기존 places와 route에 새로운 장소 추가
const updatedPlaces = [...currentDayPlans.places, newPlace];
const updatedRoute = [...currentDayPlans.route, place.id];
const requestData = {
......@@ -496,17 +493,14 @@ const AddPlace = ({ tripId, day, onBack, onPlaceSelect, tripStartDate, tripEndDa
route: updatedRoute
};
console.log(requestData);
const response = await axios.put(
`${API_URL}/api/trips/trips/${tripId}/plans/day`,
requestData
);
if (response.status === 200 || response.status === 201) {
toast.success('장소가 성공으로 추가되었습니다.');
// toast.success('장소가 성공으로 추가되었습니다.');
onSuccess?.();
onBack();
}
} catch (error) {
console.error('장소 추가 실패:', error);
......
......@@ -218,7 +218,7 @@ const MyTrip = ({ trips, onPlaceSelect, onAddPlace, onDirectionSelect, onTripSel
<div className="place-number">{index + 1}</div>
<div className="place-info">
<h5 className="place-name">{place.name}</h5>
<p className="place-location">{place.location}</p>
<p className="place-location">{place.address || place.location}</p>
</div>
<button
className="delete-place-button"
......
......@@ -76,7 +76,7 @@ const MyTripWeather = ({ location }) => {
<div className="weather-container">
<h4 className="weather-title">
{loading ? (
<div className="shimmer-text"></div>
<div className="weather-shimmer-text"></div>
) : (
`${location}의 날씨는?`
)}
......
......@@ -27,8 +27,8 @@ const Home = () => {
const [showDirection, setShowDirection] = useState(false);
const [directionInfo, setDirectionInfo] = useState(null);
const [selectedLocation, setSelectedLocation] = useState({
latitude: 35.1586,
longitude: 129.1603
latitude: 37.2829,
longitude: 127.0435
});
const [ws, setWs] = useState(null);
......@@ -134,7 +134,7 @@ const Home = () => {
setTimeout(() => {
map?.relayout();
}, 200);
}, 500);
};
const handlePlaceSelect = useCallback((place) => {
......@@ -414,7 +414,7 @@ const Home = () => {
await axios.delete(`${API_URL}/api/trips/trips/${tripId}`);
setTrips(prevTrips => prevTrips.filter(trip => trip._id !== tripId));
toast.success('여행이 성공적으로 삭제되었습니다.');
// toast.success('여행이 성공적으로 삭제되었습니다.');
} catch (error) {
console.error('여행 삭제 중 오류 발생:', error);
......
......@@ -76,7 +76,7 @@
text-align: center;
}
@keyframes shimmer {
@keyframes weather-shimmer {
0% {
background-position: -200% 0;
}
......@@ -85,13 +85,13 @@
}
}
.shimmer {
.weather-shimmer {
background: #f6f7f8;
border-radius: 8px;
padding: 15px;
}
.shimmer-text {
.weather-shimmer-text {
height: 16px;
background: linear-gradient(
90deg,
......@@ -100,26 +100,7 @@
#f0f0f0 75%
);
background-size: 200% 100%;
animation: shimmer 2s infinite linear;
animation: weather-shimmer 2s infinite linear;
border-radius: 4px;
margin: 4px 0;
}
\ No newline at end of file
.shimmer-circle {
width: 50px;
height: 50px;
border-radius: 50%;
background: linear-gradient(
90deg,
#f0f0f0 25%,
#e0e0e0 50%,
#f0f0f0 75%
);
background-size: 200% 100%;
animation: shimmer 2s infinite linear;
margin: 8px auto;
}
.weather-day.shimmer {
background: white;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment