Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
a993a27
[UNI-50] feat : 지도 페이지 설정 및 (빌딩, 위험, 주의) 마커 생성 및 이벤트 등록
dgfh0450 Jan 29, 2025
a72400a
[UNI-55] feat : react-spring-bottom-sheet 설치 및 장소 상세 바텀시트 생성
dgfh0450 Jan 30, 2025
4f4c201
[UNI-50] feat : 지도 경로 검색 Input 컴포넌트 생성
dgfh0450 Jan 30, 2025
167d328
[UNI-50] feat : 지도 메인 페이지 TopSheet 컴포넌트 생성
dgfh0450 Jan 30, 2025
b2e7428
[UNI-50] feat : Framer-motion 라이브러리 설치 및 TopSheet 애니메이션 적용
dgfh0450 Jan 30, 2025
b27b9e9
[UNI-50] feat : 지도 메인 페이지 하단 플로팅 버튼 (제보하기, 위험, 주의 토글) 생성
dgfh0450 Jan 30, 2025
b7db2cf
[UNI-50] feat : 지도 메인페이지 위험, 주의 요소 토글 적용
dgfh0450 Jan 30, 2025
c8a0afb
[UNI-50] feat : Marker 선택 이후 출발지, 도착지 설정 로직 구현
dgfh0450 Jan 30, 2025
0324ed7
[UNI-50] feat : 선택 마커 색상 변경
dgfh0450 Jan 30, 2025
7d41820
[UNI-51] feat : 지도 검색 페이지 및 지도 메인페이지 연결 (global State 추가)
dgfh0450 Jan 30, 2025
7c043d5
[UNI-50] feat : 지도 메인페이지 Input, 검색페이지 연결
dgfh0450 Jan 30, 2025
e9e9dbc
[UNI-50] feat : 출발, 도착지 입력시 마커 이미지 변환
dgfh0450 Jan 30, 2025
03b82a8
[UNI-49] refactor : 하드코딩 변수 ENUM 분리 및 rename
dgfh0450 Jan 30, 2025
2ea6b25
[UNI-49] refactor : createMarkerElement 함수 병합 및 ENUM 추가
dgfh0450 Jan 31, 2025
4e94053
Merge branch 'fe' into feat/UNI-49
jpark0506 Jan 31, 2025
039d645
[UNI-49] fix : Conflict 해제
dgfh0450 Jan 31, 2025
3f215eb
[UNI-49] fix : BuildingList -> BuildingCard로 네이밍 변경
jpark0506 Jan 31, 2025
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
272 changes: 257 additions & 15 deletions uniro_frontend/package-lock.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions uniro_frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router": "^7.1.3",
"react-sheet-slide": "^1.5.0",
"tailwindcss": "^4.0.0"
"react-spring-bottom-sheet": "^3.4.1",
"tailwindcss": "^4.0.0",
"zustand": "^5.0.3"
},
"devDependencies": {
"@eslint/js": "^9.17.0",
Expand Down
3 changes: 3 additions & 0 deletions uniro_frontend/public/icons/call-thick.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions uniro_frontend/public/icons/location-thick.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions uniro_frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import "./App.css";
import Demo from "./pages/demo";
import LandingPage from "./pages/landing";
import UniversitySearchPage from "./pages/search";
import MapPage from "./pages/map";
import BuildingSearchPage from "./pages/buildingSearch";
import NavigationResultPage from "./pages/navigationResult";

function App() {
Expand All @@ -11,6 +13,8 @@ function App() {
<Route path="/" element={<Demo />} />
<Route path="/landing" element={<LandingPage />} />
<Route path="/university" element={<UniversitySearchPage />} />
<Route path="/building" element={<BuildingSearchPage />} />
<Route path="/map" element={<MapPage />} />
<Route path="/result" element={<NavigationResultPage />} />
</Routes>
);
Expand Down
3 changes: 3 additions & 0 deletions uniro_frontend/src/assets/call-thin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions uniro_frontend/src/assets/caution.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions uniro_frontend/src/assets/danger.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions uniro_frontend/src/assets/location-thin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions uniro_frontend/src/assets/map/destination.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions uniro_frontend/src/assets/map/origin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions uniro_frontend/src/assets/report.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions uniro_frontend/src/assets/switch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions uniro_frontend/src/components/building/buildingCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { Building } from "../../data/types/node";
import { Link } from "react-router";
import CallIcon from "../../assets/call-thin.svg?react";
import LocationIcon from "../../assets/location-thin.svg?react";

interface BuildingListProps {
building: Building;
onClick: () => void;
}

export default function BuildingCard({ building, onClick }: BuildingListProps) {
const { buildingName, buildingImageUrl, address, phoneNumber } = building;
return (
<li>
<Link
className="w-full h-full px-4 py-2 rounded-200 flex flex-row items-center space-x-4 active:bg-gray-200"
onClick={onClick}
to="/map"
>
<div className="flex-1">
<p className="text-start text-kor-body1 font-medium text-gray-900">{buildingName}</p>
<p className="flex fle-row items-center text-start text-kor-body3 font-regular text-gray-700">
<LocationIcon className="mr-[2px]" />
{address}
</p>
<p className="flex fle-row items-center text-start text-kor-body3 font-regular text-gray-700">
<CallIcon className="mr-[2px]" />
{phoneNumber}
</p>
</div>
<div>
<img src={building.buildingImageUrl} className="w-[66px] h-[66px] object-cover rounded-100" />
</div>
</Link>
</li>
);
}
55 changes: 55 additions & 0 deletions uniro_frontend/src/components/map/TopSheet.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import RouteInput from "../map/routeSearchInput";
import OriginIcon from "../../assets/map/origin.svg?react";
import Destination from "../../assets/map/destination.svg?react";
import LocationIcon from "../../../public/icons/location-thick.svg?react";
import SwitchIcon from "../../assets/switch.svg?react";
import { Link } from "react-router";
import { motion } from "framer-motion";
import useRoutePoint from "../../hooks/useRoutePoint";
import useSearchBuilding from "../../hooks/useSearchBuilding";
import { RoutePoint } from "../../constant/enums";

export default function TopSheet({ open }: { open: boolean }) {
const { origin, setOrigin, destination, setDestination, switchBuilding } = useRoutePoint();
const { setMode } = useSearchBuilding();

return (
<motion.div
animate={{ y: open ? 0 : -200 }}
initial={{ y: -200 }}
exit={{ y: -200 }}
transition={{ type: "tween", duration: 0.3 }}
className="absolute top-0 w-full bg-gray-100 py-[18px] px-5 z-10 rounded-b-[24px]"
>
<p className="flex flex-row items-center mb-[10px] text-kor-body2 font-medium text-gray-800 underline underline-offset-4">
<LocationIcon stroke="#4D4D4D" className="mr-1" />
<Link to="/university">한양대학교</Link>
</p>
<div className="flex flex-row space-x-1">
<div className="flex-1 flex flex-col space-y-[10px]">
<RouteInput
onClick={() => setMode(RoutePoint.ORIGIN)}
placeholder="출발지를 입력하세요"
value={origin ? origin.buildingName : ""}
onCancel={() => setOrigin(undefined)}
>
<OriginIcon />
</RouteInput>
<RouteInput
onClick={() => setMode(RoutePoint.DESTINATION)}
placeholder="도착지를 입력하세요"
value={destination ? destination.buildingName : ""}
onCancel={() => setDestination(undefined)}
>
<Destination />
</RouteInput>
</div>
<div className="flex items-center">
<button onClick={switchBuilding} className="cursor-pointer p-1 rounded-[8px] active:bg-gray-200">
<SwitchIcon />
</button>
</div>
</div>
</motion.div>
);
}
30 changes: 30 additions & 0 deletions uniro_frontend/src/components/map/floatingButtons.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from "react";
import DangerIcon from "../../assets/danger.svg?react";
import CautionIcon from "../../assets/caution.svg?react";

interface ToggleButtonProps {
isActive: boolean;
onClick: () => void;
}

export function DangerToggleButton({ isActive, onClick }: ToggleButtonProps) {
return (
<button
onClick={onClick}
className={`w-fit h-fit p-[14px] flex items-center justify-center rounded-full border-[1.5px] active:bg-gray-200 active:border-gray-400 active:text-gray-700 ${isActive ? "bg-system-red border-gray-100 text-gray-100" : "bg-gray-100 border-gray-400 text-gray-700"}`}
>
<DangerIcon />
</button>
);
}

export function CautionToggleButton({ isActive, onClick }: ToggleButtonProps) {
return (
<button
onClick={onClick}
className={`w-fit h-fit p-[14px] flex items-center justify-center rounded-full border-[1.5px] active:bg-gray-200 active:border-gray-400 active:text-gray-700 ${isActive ? "bg-system-orange border-gray-100 text-gray-100" : "bg-gray-100 border-gray-400 text-gray-700"}`}
>
<CautionIcon />
</button>
);
}
Loading