mirror of
https://github.com/Ategon/Jamjar.git
synced 2025-02-12 06:16:21 +00:00
reenabled phase pages
This commit is contained in:
parent
505fb56df8
commit
d8894cd0eb
4 changed files with 53 additions and 53 deletions
src/components
|
@ -111,11 +111,10 @@ export default function JamHeader() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Phase-Specific Display */}
|
|
||||||
{activeJamResponse?.phase === "Suggestion" && (
|
{activeJamResponse?.phase === "Suggestion" && (
|
||||||
<div className="bg-gray-100 dark:bg-gray-800 p-4 text-center rounded-b-2x">
|
<div className="bg-gray-100 dark:bg-gray-800 p-4 text-center rounded-b-2x">
|
||||||
<a
|
<a
|
||||||
// href="/theme-suggestions"
|
href="/theme-suggestions"
|
||||||
className="text-blue-300 dark:text-blue-500 hover:underline font-semibold"
|
className="text-blue-300 dark:text-blue-500 hover:underline font-semibold"
|
||||||
>
|
>
|
||||||
Go to Theme Suggestion
|
Go to Theme Suggestion
|
||||||
|
@ -126,7 +125,7 @@ export default function JamHeader() {
|
||||||
{activeJamResponse?.phase === "Survival" && (
|
{activeJamResponse?.phase === "Survival" && (
|
||||||
<div className="bg-gray-100 dark:bg-gray-800 p-4 text-center rounded-b-2x">
|
<div className="bg-gray-100 dark:bg-gray-800 p-4 text-center rounded-b-2x">
|
||||||
<a
|
<a
|
||||||
// href="/theme-slaughter"
|
href="/theme-slaughter"
|
||||||
className="text-blue-300 dark:text-blue-500 hover:underline font-semibold"
|
className="text-blue-300 dark:text-blue-500 hover:underline font-semibold"
|
||||||
>
|
>
|
||||||
Go to Theme Survival
|
Go to Theme Survival
|
||||||
|
@ -137,7 +136,7 @@ export default function JamHeader() {
|
||||||
{activeJamResponse?.phase === "Voting" && (
|
{activeJamResponse?.phase === "Voting" && (
|
||||||
<div className="bg-gray-100 dark:bg-gray-800 p-4 text-center rounded-b-2x">
|
<div className="bg-gray-100 dark:bg-gray-800 p-4 text-center rounded-b-2x">
|
||||||
<a
|
<a
|
||||||
// href="/theme-voting"
|
href="/theme-voting"
|
||||||
className="text-blue-300 dark:text-blue-500 hover:underline font-semibold"
|
className="text-blue-300 dark:text-blue-500 hover:underline font-semibold"
|
||||||
>
|
>
|
||||||
Go to Theme Voting
|
Go to Theme Voting
|
||||||
|
|
|
@ -181,6 +181,29 @@ export default function ThemeSlaughter() {
|
||||||
return <div>Loading...</div>;
|
return <div>Loading...</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Render message if not in Theme Slaughter phase
|
||||||
|
if (activeJamResponse?.phase !== "Survival") {
|
||||||
|
return (
|
||||||
|
<div className="p-6 bg-gray-100 dark:bg-gray-800 min-h-screen">
|
||||||
|
<h1 className="text-2xl font-bold text-gray-800 dark:text-white mb-6">
|
||||||
|
Not in Theme Slaughter Phase
|
||||||
|
</h1>
|
||||||
|
<p className="text-gray-600 dark:text-gray-400">
|
||||||
|
The current phase is{" "}
|
||||||
|
<strong>{activeJamResponse?.phase || "Unknown"}</strong>. Please come
|
||||||
|
back during the Theme Slaughter phase.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const loggedIn = getCookie("token");
|
||||||
|
if (!loggedIn) {
|
||||||
|
return <div>Sign in to be able to join the Theme Survival</div>;
|
||||||
|
}
|
||||||
|
|
||||||
if (!hasJoined) {
|
if (!hasJoined) {
|
||||||
return (
|
return (
|
||||||
<div className="p-6 bg-gray-100 dark:bg-gray-800 min-h-screen">
|
<div className="p-6 bg-gray-100 dark:bg-gray-800 min-h-screen">
|
||||||
|
@ -204,28 +227,6 @@ export default function ThemeSlaughter() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render message if not in Theme Slaughter phase
|
|
||||||
if (activeJamResponse?.phase !== "Survival") {
|
|
||||||
return (
|
|
||||||
<div className="p-6 bg-gray-100 dark:bg-gray-800 min-h-screen">
|
|
||||||
<h1 className="text-2xl font-bold text-gray-800 dark:text-white mb-6">
|
|
||||||
Not in Theme Slaughter Phase
|
|
||||||
</h1>
|
|
||||||
<p className="text-gray-600 dark:text-gray-400">
|
|
||||||
The current phase is{" "}
|
|
||||||
<strong>{activeJamResponse?.phase || "Unknown"}</strong>. Please come
|
|
||||||
back during the Theme Slaughter phase.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const loggedIn = getCookie("token");
|
|
||||||
|
|
||||||
if (!loggedIn) {
|
|
||||||
return <div>Sign in to be able to join the Theme Survival</div>;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-screen">
|
<div className="flex h-screen">
|
||||||
{/* Left Side */}
|
{/* Left Side */}
|
||||||
|
|
|
@ -166,6 +166,12 @@ export default function ThemeSuggestions() {
|
||||||
return <div>Loading...</div>;
|
return <div>Loading...</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const token = getCookie("token");
|
||||||
|
|
||||||
|
if (!token) {
|
||||||
|
return <div>Sign in to be able to suggest themes</div>;
|
||||||
|
}
|
||||||
|
|
||||||
if (!hasJoined) {
|
if (!hasJoined) {
|
||||||
return (
|
return (
|
||||||
<div className="p-6 bg-gray-100 dark:bg-gray-800 min-h-screen">
|
<div className="p-6 bg-gray-100 dark:bg-gray-800 min-h-screen">
|
||||||
|
@ -189,12 +195,6 @@ export default function ThemeSuggestions() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const token = getCookie("token");
|
|
||||||
|
|
||||||
if (!token) {
|
|
||||||
return <div>Sign in to be able to suggest themes</div>;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Render message if not in Suggestion phase
|
// Render message if not in Suggestion phase
|
||||||
if (activeJamResponse?.phase !== "Suggestion") {
|
if (activeJamResponse?.phase !== "Suggestion") {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -144,6 +144,27 @@ export default function VotingPage() {
|
||||||
return <div>Loading...</div>;
|
return <div>Loading...</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (activeJamResponse?.phase !== "Voting") {
|
||||||
|
return (
|
||||||
|
<div className="p-4 bg-gray-100 dark:bg-gray-800 min-h-screen">
|
||||||
|
<h1 className="text-2xl font-bold text-gray-800 dark:text-white mb-4">
|
||||||
|
Not in Voting Phase
|
||||||
|
</h1>
|
||||||
|
<p className="text-gray-600 dark:text-gray-400">
|
||||||
|
The current phase is{" "}
|
||||||
|
<strong>{activeJamResponse?.phase || "Unknown"}</strong>. Please come
|
||||||
|
back during the Voting phase.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const loggedIn = getCookie("token");
|
||||||
|
|
||||||
|
if (!loggedIn) {
|
||||||
|
return <div>Sign in to be able to vote</div>;
|
||||||
|
}
|
||||||
|
|
||||||
if (!hasJoined) {
|
if (!hasJoined) {
|
||||||
return (
|
return (
|
||||||
<div className="p-6 bg-gray-100 dark:bg-gray-800 min-h-screen">
|
<div className="p-6 bg-gray-100 dark:bg-gray-800 min-h-screen">
|
||||||
|
@ -167,27 +188,6 @@ export default function VotingPage() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activeJamResponse?.phase !== "Voting") {
|
|
||||||
return (
|
|
||||||
<div className="p-4 bg-gray-100 dark:bg-gray-800 min-h-screen">
|
|
||||||
<h1 className="text-2xl font-bold text-gray-800 dark:text-white mb-4">
|
|
||||||
Not in Voting Phase
|
|
||||||
</h1>
|
|
||||||
<p className="text-gray-600 dark:text-gray-400">
|
|
||||||
The current phase is{" "}
|
|
||||||
<strong>{activeJamResponse?.phase || "Unknown"}</strong>. Please come
|
|
||||||
back during the Voting phase.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const loggedIn = getCookie("token");
|
|
||||||
|
|
||||||
if (!loggedIn) {
|
|
||||||
return <div>Sign in to be able to vote</div>;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="p-3 bg-gray-100 dark:bg-gray-800 min-h-screen">
|
<div className="p-3 bg-gray-100 dark:bg-gray-800 min-h-screen">
|
||||||
<h1 className="text-2xl font-bold text-gray-800 dark:text-white mb-4">
|
<h1 className="text-2xl font-bold text-gray-800 dark:text-white mb-4">
|
||||||
|
|
Loading…
Reference in a new issue