Skip to content

Commit 84cbb3d

Browse files
committed
🎨 Direct user to sign up or login page when not logged in (#1706)
1 parent 9f9f06a commit 84cbb3d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/lib/components/SubmissionStatus/UpdatingDropdown.svelte

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
import { submission_statuses } from '$lib/services/submission_status';
3939
import { errorMessageStore } from '$lib/stores/error_message';
4040
41+
import { SIGNUP_PAGE, LOGIN_PAGE } from '$lib/constants/navbar-links';
42+
4143
interface Props {
4244
taskResult: TaskResult;
4345
isLoggedIn: boolean;
@@ -178,7 +180,7 @@
178180
{activeUrl}
179181
{dropdownStatus}
180182
{closeDropdown}
181-
class="absolute w-24 z-20 left-auto right-0 mt-8"
183+
class="absolute w-32 z-20 left-auto right-0 mt-8"
182184
>
183185
<DropdownUl>
184186
{#if isLoggedIn}
@@ -187,6 +189,9 @@
187189
{submissionStatus.labelName}
188190
</DropdownLi>
189191
{/each}
192+
{:else}
193+
<DropdownLi href={SIGNUP_PAGE}>アカウント作成</DropdownLi>
194+
<DropdownLi href={LOGIN_PAGE}>ログイン</DropdownLi>
190195
{/if}
191196
</DropdownUl>
192197
</Dropdown>

src/lib/components/TaskTables/TaskTableBodyCell.svelte

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@
2525

2626
<div class="flex justify-between w-full min-w-0">
2727
{@render taskTitleAndExternalLink(taskResult)}
28-
29-
{#if isLoggedIn}
30-
{@render submissionUpdaterAndLinksOfTaskDetailPage(taskResult)}
31-
{/if}
28+
{@render submissionUpdaterAndLinksOfTaskDetailPage(taskResult)}
3229
</div>
3330
</div>
3431

0 commit comments

Comments
 (0)