-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(website): change paths of submission pages and re-use header
- Loading branch information
1 parent
d7c4f10
commit dcd78ac
Showing
33 changed files
with
354 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
website/src/components/Submission/SubmissionPageWrapper.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
import { SubmissionGroupSelector } from './SubmissionGroupSelector'; | ||
import BaseLayout from '../../layouts/BaseLayout.astro'; | ||
import { type GetGroupsAndCurrentGroupResult } from '../../utils/submissionPages'; | ||
import NeedToLogin from '../common/NeedToLogin.astro'; | ||
interface Props { | ||
title: string; | ||
organism: string; | ||
groupsResult: GetGroupsAndCurrentGroupResult; | ||
} | ||
const { title, groupsResult, organism } = Astro.props; | ||
--- | ||
|
||
<BaseLayout title={title}> | ||
{ | ||
groupsResult.match( | ||
({ currentGroup: group, groupsOfUser }) => ( | ||
<> | ||
<SubmissionGroupSelector | ||
groups={groupsOfUser} | ||
selectedGroupId={group.groupId} | ||
organism={organism} | ||
client:load | ||
/> | ||
<h1 class='title'>{title}</h1> | ||
<slot /> | ||
</> | ||
), | ||
({ type }) => { | ||
switch (type) { | ||
case 'not_logged_in': | ||
return <NeedToLogin message='You need to be logged in to submit sequences.' />; | ||
case 'group_not_found': | ||
return <p class='text-red-500'>Group not found</p>; | ||
default: | ||
return <p class='text-red-500'>Unexpected error: Failed to load groups</p>; | ||
} | ||
}, | ||
) | ||
} | ||
</BaseLayout> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.