Skip to content

Commit

Permalink
Merge pull request #80 from 9oormthonUniv-seoultech/develop
Browse files Browse the repository at this point in the history
에러수정
  • Loading branch information
ej070961 authored Nov 8, 2024
2 parents 906d718 + bf0f057 commit 5464d76
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 48 deletions.
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import CheckPhoto from "./pages/PhotoUpload/CheckPhoto";
import WriteDetail from "./pages/PhotoUpload/WriteDetail";
import Share from "./pages/Share";
import AlertDialog from "./components/Alert/AlertDialog";
import ShareCompleteScreen from "./pages/PhotoUpload/ShareCompleteScreen";

function App() {
const { isLoggedIn } = useAuthStore();
Expand Down Expand Up @@ -86,6 +87,7 @@ function App() {
<Route path="/photo-check" element={<CheckPhoto />} />
<Route path="/write-detail" element={<WriteDetail />} />
<Route path="/upload-complete" element={<UploadComplete />} />
<Route path="/share-complete" element={<ShareCompleteScreen />} />
<Route path="/album" element={<Album />} />
</Route>
<Route path="/share" element={<Share />} />
Expand Down
2 changes: 1 addition & 1 deletion src/api/my.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const getPhotoLikes = async (accessToken: string) => {
try {
const res = await Get<{ albumId: number; photoUrl: string; like: boolean }[]>("/api/v1/album/favorite", {
headers: {
Authorization: `Bearer: ${accessToken}`,
Authorization: `Bearer ${accessToken}`,
},
});
return res.data.payload;
Expand Down
Binary file removed src/assets/images/share-complete.png
Binary file not shown.
9 changes: 9 additions & 0 deletions src/assets/images/share-complete.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 5 additions & 24 deletions src/components/Album/AlbumMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ import { getBoothLatLng } from "../../api/booth";
export default function AlbumMap() {
const { lat, lng, selectedBrands } = useBoothFilterStore();
const [activeId, setActiveId] = useState<number>(-1);

//전체 포토부스 위치 정보 조회 api 호출
const { isLoading, data } = useQuery({
queryKey: ["getBoothLatLng", lat, lng, selectedBrands],
queryFn: () => getBoothLatLng(lat, lng, selectedBrands!),
});


//처음 페이지 접속 시 사용자의 현 위치를 받아와서 center 세팅
useEffect(() => {
//현 위치 받아오기
Expand All @@ -31,35 +25,22 @@ export default function AlbumMap() {
});
}
};

fetchLocation();
}, []);

const handleClick = (id: number) => {
if (activeId === id) {
setActiveId(-1);
} else {
setActiveId(id);
}
};

return (
<MapContainer lat={lat} lng={lng}>
{/* CustomOverlayMap으로 커스텀 마커를 직접 렌더링 */}
{!isLoading &&
data &&
data.map((item, index) => (
<CustomOverlayMap position={{ lat: item.x, lng: item.y }} zIndex={1} key={index}>
<div onClick={() => handleClick(item.id)} className="flex flex-col items-center">
{activeId === item.id ? (
<ActiveCustomMarker width={58} height={68} imageUrl={getLogoUrl(item.brand)} color="#5453EE" />
) : (
<CustomMarker width={44} height={50} imageUrl={getLogoUrl(item.brand)} color="#2A303A" />
)}
</div>
</CustomOverlayMap>
))}


{/* 클릭 시 해당 포토부스에 해당 되는 모달창 렌더링 */}
{/*{activeId >= 0 && <BoothModal boothId={activeId.toString()} />}*/}
</MapContainer>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Album/HashtagSearchModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ export default function HashtagSearchModal({ setIsModalOpen }: BoothFilterProps)
</div>
) : (
<>
<div className="flex-col justify-start items-start gap-[5px] inline-flex">
<div className="text-[#171d24] text-lg font-semibold font-['Pretendard']">
<div className="flex-col justify-start items-start gap-[5px] inline-flex w-full ml-8 mt-3">
<div className="text-[#171d24] text-[18px] font-semibold font-['Pretendard']">
{imageList.length}장의 추억
</div>
</div>
Expand Down Expand Up @@ -127,7 +127,7 @@ const Container = styled.div`
`;

const ImageContainer = styled.div`
${tw`flex flex-col w-full h-[80vh] mt-4`}
${tw`flex flex-col w-full h-[80vh] mt-3`}
overflow-y: auto;
position: relative;
z-index: 1; /* 다른 요소들보다 낮게 설정 */
Expand Down
Loading

0 comments on commit 5464d76

Please sign in to comment.