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

프로필: 사용자의 학부가 존재하지 않을 때 알 수 없음 표시 #112

Merged
merged 1 commit into from
Aug 26, 2022
Merged
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
28 changes: 14 additions & 14 deletions packages/client/src/components/molecule/Profile.svelte
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<script lang='ts'>
import Tag from '../atom/Tag.svelte';
import { getDepartmentNameById } from '$lib/utils';
import { config } from '$lib/store';
import Skeleton from "../atom/Skeleton.svelte";
import Tag from '../atom/Tag.svelte';
import { getDepartmentNameById } from '$lib/utils';
import { config } from '$lib/store';
import Skeleton from '../atom/Skeleton.svelte';

export let user: User;
export let user: User;
</script>
{#if user}
<div class='profile'>
<p>반갑습니다!</p>
<p><span class='name'>{user?.name ?? '알 수 없음'}</span>님</p>
<Tag class='bg-gray-300 text-gray-700'>학부 \ {getDepartmentNameById($config, user.department)}</Tag>
<Tag class='bg-gray-300 text-gray-700'>학부 \ {getDepartmentNameById($config, user.department) ?? '알 수 없음'}</Tag>
<Tag class='bg-gray-300 text-gray-700'>학번 \ {user.id}</Tag>
</div>
{:else}
<div class='profile'>
<div class="skeleton-wrap gap-3">
<Skeleton class="w-20 h-20 rounded-full bg-gray-300"/>
<div class="flex flex-col gap-2">
<Skeleton class="w-28 h-7 rounded-lg bg-gray-300"/>
<Skeleton class="w-36 h-10 rounded-lg bg-gray-300"/>
<div class='skeleton-wrap gap-3'>
<Skeleton class='w-20 h-20 rounded-full bg-gray-300' />
<div class='flex flex-col gap-2'>
<Skeleton class='w-28 h-7 rounded-lg bg-gray-300' />
<Skeleton class='w-36 h-10 rounded-lg bg-gray-300' />
</div>
</div>
</div>
Expand All @@ -39,9 +39,9 @@
@apply text-5xl font-bold text-primary-800;
}

.skeleton-wrap {
@apply flex flex-row;
}
.skeleton-wrap {
@apply flex flex-row;
}
</style>