Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ 프로필 유저정보 Skeleton UI #86

Merged
merged 3 commits into from
May 31, 2024
Merged
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
1 change: 0 additions & 1 deletion src/widgets/profile-header/index.ts

This file was deleted.

15 changes: 0 additions & 15 deletions src/widgets/profile-header/ui/ProfileHeader.scss

This file was deleted.

13 changes: 0 additions & 13 deletions src/widgets/profile-header/ui/ProfileHeader.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/widgets/profile-header/ui/index.ts

This file was deleted.

8 changes: 7 additions & 1 deletion src/widgets/profile-user/ui/ProfileUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useGetUser } from '../api';
import { ProfileCount } from './ProfileCount';
import './ProfileUser.scss';
import { ProfileUserImage } from './ProfileUserImage';
import { SkeletonProfileUser } from './SkeletonProfileUser';

interface ProfileUserProps {
userId: number;
Expand All @@ -15,7 +16,12 @@ export const ProfileUser = ({ userId, isOwner }: ProfileUserProps) => {
const { data, isLoading, isError, refetchUser } = useGetUser(userId);

if (isLoading) {
return <div>스켈레톤 들어갈곳</div>;
return (
<>
<PageHeader page='' prevPageLink='/' />
<SkeletonProfileUser />
</>
);
}

if (isError || !data) {
Expand Down
82 changes: 82 additions & 0 deletions src/widgets/profile-user/ui/SkeletonProfileUser.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
.skeleton-profile-user-wrapper {
height: 260px;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
box-shadow: 0px 20px 34.5px 0px #dddddd40;

.skeleton-profile-top-container {
height: 148px;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;

.skeleton-proile {
@include skeletonAnimation();
background-color: $gray2;
position: relative;
width: 81px;
height: 81px;
border-radius: 50%;
overflow: hidden;
}

.skeleton-user-name {
@include skeletonAnimation();
background-color: $gray2;
width: 53px;
height: 14px;
border-radius: 4px;
}

.skeleton-profile-btn {
@include skeletonAnimation();
background-color: $gray2;
width: 68px;
height: 26px;
border-radius: 6px;
}
}

.skeleton-profile-count-container {
width: 220px;
height: 41px;
display: flex;
align-items: center;
justify-content: space-between;
text-align: center;
padding-top: 28px;

.skeleton-profile-count {
display: flex;
height: 100%;
flex-direction: column;
justify-content: space-between;
align-items: center;
gap: 8px;

.skeleton-count-number {
@include skeletonAnimation();
background-color: $gray2;
width: 26px;
height: 26px;
border-radius: 6px;
}
.skeleton-count-text {
@include skeletonAnimation();
background-color: $gray2;
width: 33px;
height: 14px;
border-radius: 4px;
}
}

.count-divider {
width: 0.5px;
height: 36px;
background-color: $gray4;
}
}
}
29 changes: 29 additions & 0 deletions src/widgets/profile-user/ui/SkeletonProfileUser.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import './SkeletonProfileUser.scss';

export const SkeletonProfileUser = () => {
return (
<section className='skeleton-profile-user-wrapper'>
<section className='skeleton-profile-top-container'>
<div className='skeleton-proile' />
<div className='skeleton-user-name' />
<div className='skeleton-profile-btn'></div>
</section>
<section className='skeleton-profile-count-container'>
<div className='skeleton-profile-count'>
<div className='skeleton-count-number' />
<div className='skeleton-count-text' />
</div>
<div className='count-divider' />
<div className='skeleton-profile-count'>
<div className='skeleton-count-number' />
<div className='skeleton-count-text' />
</div>
<div className='count-divider' />
<div className='skeleton-profile-count'>
<div className='skeleton-count-number' />
<div className='skeleton-count-text' />
</div>
</section>
</section>
);
};
Loading