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

Fix: isPaidPlan null with removed users #590

Merged
merged 1 commit into from
Jul 6, 2023
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
2 changes: 1 addition & 1 deletion src/lib/components/Browse/Sections/ItemCarousel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<p class="text-2xl truncate text-white font-semibold">{channel.title || ''}</p>
<div class="flex flex-row items-center gap-2">
<div class="avatar">
<div class="w-14 mask {channel.isPaidPlan ? 'mask-hexagon' : 'mask-squircle'}">
<div class="w-14 mask {channel?.isPaidPlan ? 'mask-hexagon' : 'mask-squircle'}">
<img src={channel.avatar} alt="" />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Browse/Sections/ItemChannel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<p class="text-lg font-semibold truncate">{channel.title}</p>
<div class="flex flex-row gap-2 max-w-[25rem]">
<div class="avatar">
<div class="w-12 mask {channel.isPaidPlan ? 'mask-hexagon' : 'mask-squircle'}">
<div class="w-12 mask {channel?.isPaidPlan ? 'mask-hexagon' : 'mask-squircle'}">
<img src={channel.avatar} alt="" />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Browse/Sections/ItemTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<td>
<div class="flex items-center space-x-2 my-3 pl-3">
<div class="avatar">
<div class="w-12 mask {channel.isPaidPlan ? 'mask-hexagon' : 'mask-squircle'}">
<div class="w-12 mask {channel?.isPaidPlan ? 'mask-hexagon' : 'mask-squircle'}">
<img src={channel.avatar} alt="" />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Browse/Sections/ItemUser.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<a class="rounded-md" href="/profile/{user.username}">
<div class="text-center space-y-3 w-[200px]">
<div class="avatar">
<div class="w-36 mask {user.isPaidPlan ? 'mask-hexagon' : 'mask-squircle'}">
<div class="w-36 mask {user?.isPaidPlan ? 'mask-hexagon' : 'mask-squircle'}">
<img src={user.avatar} alt="" />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Channel/Chat/DropdownViewChannel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
<a href="/profile/{host?.username}">
<div class="flex flex-wrap gap-2">
<div class="avatar online">
<div class="w-12 mask {host.isPaidPlan ? 'mask-hexagon' : 'mask-squircle'}">
<div class="w-12 mask {host?.isPaidPlan ? 'mask-hexagon' : 'mask-squircle'}">
<img src={host?.avatar} alt="" />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Channel/Stream/VideoItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@
<img
src={video.avatar}
alt=""
class="absolute inset-0 w-24 md:w-24 mask {video.isPaidPlan
class="absolute inset-0 w-24 md:w-24 mask {video?.isPaidPlan
? 'mask-hexagon'
: 'mask-squircle'} object-cover m-auto" />
<div class="absolute inset-0">
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Global/DrawerMain.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<div class={isChannelPage ? 'max-w-md' : 'max-w-full'}>
<div class="avatar {$isOnline ? 'online' : 'offline'}">
<div
class="w-24 {isChannelPage ? 'md:w-12' : ''} mask {currentUser.isPaidPlan
class="w-24 {isChannelPage ? 'md:w-12' : ''} mask {currentUser?.isPaidPlan
? 'mask-hexagon'
: 'mask-squircle'}">
<img src={currentUser.avatar} alt="" />
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Profile/TopSection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<div class="w-32 h-32">
<div class="avatar -top-16 {profile.isOnline ? 'online' : 'offline'}">
<div
class="mask {profile.isPaidPlan
class="mask {profile?.isPaidPlan
? 'mask-hexagon'
: 'mask-squircle'} h-auto align-middle max-w-150-px">
<img src={profile.avatar} alt="" class="!w-32 !h-32" />
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Search/ItemSearchChannel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

<div class="flex items-center">
<div class="avatar">
<div class="w-12 mask {item.isPaidPlan ? 'mask-hexagon' : 'mask-squircle'}">
<div class="w-12 mask {item?.isPaidPlan ? 'mask-hexagon' : 'mask-squircle'}">
<img src={item.avatar} alt="" />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Search/ItemSearchUser.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="flex-col md:flex-row gap-4 w-full contents">
<div class="max-w-md">
<div class="avatar">
<div class="w-32 mask {item.isPaidPlan ? 'mask-hexagon' : 'mask-squircle'}">
<div class="w-32 mask {item?.isPaidPlan ? 'mask-hexagon' : 'mask-squircle'}">
<img loading="lazy" src={item.avatar} alt="" />
</div>
</div>
Expand Down