Refactor ESLint configuration and update code formatting: Standardize quotes in eslint.config.mjs, next.config.js, and various TypeScript files for consistency. Add Prettier as a dependency and include formatting scripts in package.json. Clean up unnecessary whitespace in multiple files to enhance code readability.
This commit is contained in:
@@ -385,8 +385,8 @@ export default function EventManagement() {
|
||||
return status === "UPCOMING"
|
||||
? "bg-green-900/50 border border-green-500/50 text-green-400"
|
||||
: status === "LIVE"
|
||||
? "bg-yellow-900/50 border border-yellow-500/50 text-yellow-400"
|
||||
: "bg-gray-900/50 border border-gray-500/50 text-gray-400";
|
||||
? "bg-yellow-900/50 border border-yellow-500/50 text-yellow-400"
|
||||
: "bg-gray-900/50 border border-gray-500/50 text-gray-400";
|
||||
})()}`}
|
||||
>
|
||||
{getStatusLabel(calculateEventStatus(event.date))}
|
||||
|
||||
@@ -326,16 +326,16 @@ export default function EventsPageSection({
|
||||
isToday
|
||||
? "bg-pixel-gold/30 border-pixel-gold/70 border-2"
|
||||
: hasEvents
|
||||
? `${eventBgColor} ${eventBorderColor} border-2`
|
||||
: "border-pixel-gold/10"
|
||||
? `${eventBgColor} ${eventBorderColor} border-2`
|
||||
: "border-pixel-gold/10"
|
||||
} ${
|
||||
hasEvents ? "ring-2 ring-offset-1 ring-offset-black" : ""
|
||||
} ${
|
||||
hasLive
|
||||
? "ring-red-500/50"
|
||||
: hasUpcoming
|
||||
? "ring-green-500/50"
|
||||
: ""
|
||||
? "ring-green-500/50"
|
||||
: ""
|
||||
}`}
|
||||
>
|
||||
<div
|
||||
@@ -343,8 +343,8 @@ export default function EventsPageSection({
|
||||
isToday
|
||||
? "text-pixel-gold"
|
||||
: hasEvents
|
||||
? "text-white"
|
||||
: "text-gray-400"
|
||||
? "text-white"
|
||||
: "text-gray-400"
|
||||
}`}
|
||||
>
|
||||
{day}
|
||||
@@ -360,8 +360,8 @@ export default function EventsPageSection({
|
||||
status === "UPCOMING"
|
||||
? "bg-green-400"
|
||||
: status === "LIVE"
|
||||
? "bg-red-400 animate-pulse"
|
||||
: "bg-gray-400"
|
||||
? "bg-red-400 animate-pulse"
|
||||
: "bg-gray-400"
|
||||
}`}
|
||||
title={event.name}
|
||||
/>
|
||||
|
||||
@@ -78,10 +78,10 @@ export default function Leaderboard() {
|
||||
entry.rank === 1
|
||||
? "bg-pixel-gold text-black"
|
||||
: entry.rank === 2
|
||||
? "bg-gray-600 text-white"
|
||||
: entry.rank === 3
|
||||
? "bg-orange-800 text-white"
|
||||
: "bg-gray-900 text-gray-400 border border-gray-800"
|
||||
? "bg-gray-600 text-white"
|
||||
: entry.rank === 3
|
||||
? "bg-orange-800 text-white"
|
||||
: "bg-gray-900 text-gray-400 border border-gray-800"
|
||||
}`}
|
||||
>
|
||||
{entry.rank}
|
||||
|
||||
@@ -93,10 +93,10 @@ export default function LeaderboardSection({
|
||||
entry.rank === 1
|
||||
? "bg-gradient-to-br from-pixel-gold to-orange-500 text-black shadow-lg shadow-pixel-gold/50"
|
||||
: entry.rank === 2
|
||||
? "bg-gradient-to-br from-gray-400 to-gray-500 text-black"
|
||||
: entry.rank === 3
|
||||
? "bg-gradient-to-br from-orange-700 to-orange-800 text-white"
|
||||
: "bg-gray-900 text-gray-400 border border-gray-800"
|
||||
? "bg-gradient-to-br from-gray-400 to-gray-500 text-black"
|
||||
: entry.rank === 3
|
||||
? "bg-gradient-to-br from-orange-700 to-orange-800 text-white"
|
||||
: "bg-gray-900 text-gray-400 border border-gray-800"
|
||||
}`}
|
||||
>
|
||||
{entry.rank}
|
||||
|
||||
@@ -14,10 +14,10 @@ interface UserData {
|
||||
|
||||
export default async function NavigationWrapper() {
|
||||
const session = await auth();
|
||||
|
||||
|
||||
let userData: UserData | null = null;
|
||||
const isAdmin = session?.user?.role === "ADMIN";
|
||||
|
||||
|
||||
if (session?.user?.id) {
|
||||
const user = await prisma.user.findUnique({
|
||||
where: { id: session.user.id },
|
||||
@@ -31,7 +31,7 @@ export default async function NavigationWrapper() {
|
||||
level: true,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
if (user) {
|
||||
userData = user;
|
||||
}
|
||||
@@ -39,4 +39,3 @@ export default async function NavigationWrapper() {
|
||||
|
||||
return <Navigation initialUserData={userData} initialIsAdmin={isAdmin} />;
|
||||
}
|
||||
|
||||
|
||||
@@ -130,8 +130,8 @@ export default function PlayerStats({ initialUserData }: PlayerStatsProps) {
|
||||
hpPercentage > 60
|
||||
? "from-green-600 to-green-700"
|
||||
: hpPercentage > 30
|
||||
? "from-yellow-600 to-orange-700"
|
||||
: "from-red-700 to-red-900";
|
||||
? "from-yellow-600 to-orange-700"
|
||||
: "from-red-700 to-red-900";
|
||||
|
||||
return (
|
||||
<div className="flex items-center gap-3">
|
||||
|
||||
@@ -187,8 +187,8 @@ export default function ProfileForm({
|
||||
hpPercentage > 60
|
||||
? "from-green-600 to-green-700"
|
||||
: hpPercentage > 30
|
||||
? "from-yellow-600 to-orange-700"
|
||||
: "from-red-700 to-red-900";
|
||||
? "from-yellow-600 to-orange-700"
|
||||
: "from-red-700 to-red-900";
|
||||
|
||||
return (
|
||||
<section className="relative w-full min-h-screen flex flex-col items-center justify-center overflow-hidden pt-24 pb-16">
|
||||
|
||||
Reference in New Issue
Block a user