Skip to content

Commit

Permalink
MyWishlist 로딩중 화면 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnsy committed Feb 2, 2025
1 parent 068dd72 commit b449a20
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/routes/MyWishlist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import { useEffect, useState } from 'react';
import { useCallback } from 'react';

import axiosInstance from '@/axiosInstance';
import Topbar from '@/components/home/Topbar';
import Header from '@/components/home/Topbar/Header';
import type { ProfileInfo } from '@/components/user/profile/Profile';
import type { WishlistResponse } from '@/types/room';

export const MyWishlist = () => {
const [userId, setUserId] = useState<number | null>(null);
const [wishlist, setWishlist] = useState<WishlistResponse | null>(null);
Expand Down Expand Up @@ -83,12 +84,19 @@ export const MyWishlist = () => {

return (
<div className="flex flex-col justify-start items-center w-full">
<Topbar />
{isLoading && <div className="text-lg text-gray-700 mt-8">로딩중...</div>}
<Header />
<hr className="w-full mb-8 border-t border-gray-300" />
<div className="w-3/4 mb-8">
<h1 className="text-3xl font-bold my-4">위시리스트</h1>
</div>

{error !== null && error.trim() !== '' && (
<div className="text-lg text-red-600 mt-8">{error}</div>
)}
{wishlist !== null ? (

{isLoading ? (
<div className="text-lg text-gray-700 mt-8">로딩중...</div>
) : wishlist !== null ? (
<div className="grid grid-cols-4 gap-4 mt-8 px-4 w-full">
{wishlist.content.map((item) => (
<div
Expand Down

0 comments on commit b449a20

Please sign in to comment.