-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00a0a3b
commit 2163497
Showing
4 changed files
with
30 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,18 @@ | ||
import { SubmissionTabs } from "./SubmissionTabs"; | ||
import scaffoldConfig from "~~/scaffold.config"; | ||
import { getAllSubmissions } from "~~/services/database/repositories/submissions"; | ||
|
||
export const Submissions = async () => { | ||
const submissions = await getAllSubmissions(); | ||
return <SubmissionTabs submissions={submissions} />; | ||
const { votingEnabled } = scaffoldConfig; | ||
return ( | ||
<> | ||
{!votingEnabled && ( | ||
<div className="max-w-7xl container mx-auto px-6 mb-6"> | ||
<div className="alert alert-warning">Voting period ended</div> | ||
</div> | ||
)} | ||
<SubmissionTabs submissions={submissions} /> | ||
</> | ||
); | ||
}; |
7 changes: 7 additions & 0 deletions
7
packages/nextjs/app/api/submissions/[submissionId]/votes/route.ts
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