mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-05-13 13:17:45 +00:00
unblock submissions
This commit is contained in:
parent
1dacc3ab4a
commit
147d005a14
1 changed files with 9 additions and 10 deletions
|
|
@ -31,16 +31,15 @@ export default async function SubmitPage() {
|
|||
if (activePunishment) redirect("/off-the-island");
|
||||
|
||||
// Check if submissions are disabled
|
||||
// let value: boolean | null = true;
|
||||
// try {
|
||||
// const response = await fetch(`${process.env.NEXT_PUBLIC_BASE_URL}/api/admin/can-submit`);
|
||||
// value = await response.json();
|
||||
// } catch (error) {
|
||||
// return <p>An error occurred!</p>;
|
||||
// }
|
||||
let value: boolean | null = true;
|
||||
try {
|
||||
const response = await fetch(`${process.env.NEXT_PUBLIC_BASE_URL}/api/admin/can-submit`);
|
||||
value = await response.json();
|
||||
} catch (error) {
|
||||
return <p>An error occurred!</p>;
|
||||
}
|
||||
|
||||
// if (!value)
|
||||
return (
|
||||
if (!value) return (
|
||||
<div className="grow flex items-center justify-center">
|
||||
<div className="bg-amber-50 border-2 border-amber-500 rounded-2xl shadow-lg p-8 max-w-xs w-full text-center flex flex-col">
|
||||
<h2 className="text-5xl font-black">Sorry</h2>
|
||||
|
|
@ -53,5 +52,5 @@ export default async function SubmitPage() {
|
|||
</div>
|
||||
);
|
||||
|
||||
// return <SubmitForm />;
|
||||
return <SubmitForm />;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue