perf: migrate pages to Cache Components via root layout opt-out
Remove the per-route 'export const instant = false' opt-outs now that the root layout carries the single Cache Components opt-out. Child pages inherit the opt-out, so admin/mod/radio leaf pages that only access cached or DB data stay instant while runtime-dependent pages remain dynamic. Update the staff-smoke contract test to assert the root-layout contract.
This commit is contained in:
1 parent
b25e7b00dd
commit
51ef7602ca
203 files changed
+16
-811
No files matched your search
@@ -14,10 +14,6 @@ import {
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { resolveHotelName } from "@/lib/hotel-name";
|
import { resolveHotelName } from "@/lib/hotel-name";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
// Canonical Habbo badge image CDN (same base used by the profile page).
|
// Canonical Habbo badge image CDN (same base used by the profile page).
|
||||||
const BADGE_IMG_BASE = "https://images.habbo.com/c_images/album1584";
|
const BADGE_IMG_BASE = "https://images.habbo.com/c_images/album1584";
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ import { auth } from "@/lib/auth";
|
|||||||
import { db, WebsiteStaffApplications, WebsiteTeams } from "@/lib/db";
|
import { db, WebsiteStaffApplications, WebsiteTeams } from "@/lib/db";
|
||||||
import { resolveHotelName } from "@/lib/hotel-name";
|
import { resolveHotelName } from "@/lib/hotel-name";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
// Canonical Habbo badge image CDN (same base used by the profile page).
|
// Canonical Habbo badge image CDN (same base used by the profile page).
|
||||||
const BADGE_IMG_BASE = "https://images.habbo.com/c_images/album1584";
|
const BADGE_IMG_BASE = "https://images.habbo.com/c_images/album1584";
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,6 @@ import { getTranslations } from "next-intl/server";
|
|||||||
import { ContentCard, EmptyState } from "@/components/public/ui";
|
import { ContentCard, EmptyState } from "@/components/public/ui";
|
||||||
import { db, WebsiteBadges } from "@/lib/db";
|
import { db, WebsiteBadges } from "@/lib/db";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "Badges" };
|
export const metadata = { title: "Badges" };
|
||||||
|
|
||||||
// Canonical Habbo badge image CDN. A badge_key (e.g. "ADM") maps to a .gif here.
|
// Canonical Habbo badge image CDN. A badge_key (e.g. "ADM") maps to a .gif here.
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import { auth } from "@/lib/auth";
|
|||||||
import { unixNow } from "@/lib/bans";
|
import { unixNow } from "@/lib/bans";
|
||||||
import { Ban, db } from "@/lib/db";
|
import { Ban, db } from "@/lib/db";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
const FAR_FUTURE = Math.floor(Date.now() / 1000) + 50 * 365 * 24 * 3600;
|
const FAR_FUTURE = Math.floor(Date.now() / 1000) + 50 * 365 * 24 * 3600;
|
||||||
|
|
||||||
export default async function BannedPage() {
|
export default async function BannedPage() {
|
||||||
|
|||||||
@@ -2,10 +2,6 @@ import Link from "next/link";
|
|||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import { ContentCard } from "@/components/public/ui";
|
import { ContentCard } from "@/components/public/ui";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "Community" };
|
export const metadata = { title: "Community" };
|
||||||
|
|
||||||
const LINKS = [
|
const LINKS = [
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { ContentCard } from "@/components/public/ui";
|
import { ContentCard } from "@/components/public/ui";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
// Public API documentation. Static, hand-maintained from the routes that
|
// Public API documentation. Static, hand-maintained from the routes that
|
||||||
// actually exist under src/app/api — keep this in sync when endpoints change.
|
// actually exist under src/app/api — keep this in sync when endpoints change.
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ import { auth } from "@/lib/auth";
|
|||||||
import { db, User, WebsiteDrawbadges } from "@/lib/db";
|
import { db, User, WebsiteDrawbadges } from "@/lib/db";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
// Reads the live users + website_drawbadges tables and writes credits/badges on
|
// Reads the live users + website_drawbadges tables and writes credits/badges on
|
||||||
// purchase — must never be statically rendered.
|
// purchase — must never be statically rendered.
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,6 @@ import {
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { EventRegisterButton } from "./event-register-button";
|
import { EventRegisterButton } from "./event-register-button";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
function parseEventId(slugOrId: string): number | null {
|
function parseEventId(slugOrId: string): number | null {
|
||||||
if (/^\d+$/.test(slugOrId)) return Number.parseInt(slugOrId, 10);
|
if (/^\d+$/.test(slugOrId)) return Number.parseInt(slugOrId, 10);
|
||||||
const match = slugOrId.match(/-(\d+)$/);
|
const match = slugOrId.match(/-(\d+)$/);
|
||||||
|
|||||||
@@ -12,10 +12,6 @@ import {
|
|||||||
import { excerpt, slugify } from "@/lib/format";
|
import { excerpt, slugify } from "@/lib/format";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "Events" };
|
export const metadata = { title: "Events" };
|
||||||
|
|
||||||
export default async function EventsPage() {
|
export default async function EventsPage() {
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ import { CaptchaWidget } from "@/components/auth/captcha-widget";
|
|||||||
import { ContentCard } from "@/components/public/ui";
|
import { ContentCard } from "@/components/public/ui";
|
||||||
import { captchaConfig } from "@/lib/services/captcha";
|
import { captchaConfig } from "@/lib/services/captcha";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function ForgotPage({
|
export default async function ForgotPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ import { db, MessengerFriendships, User } from "@/lib/db";
|
|||||||
import { avatarImageUrl } from "@/lib/format";
|
import { avatarImageUrl } from "@/lib/format";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "Friends" };
|
export const metadata = { title: "Friends" };
|
||||||
|
|
||||||
type SearchParams = Promise<{ removed?: string; error?: string }>;
|
type SearchParams = Promise<{ removed?: string; error?: string }>;
|
||||||
|
|||||||
@@ -15,10 +15,6 @@ import {
|
|||||||
} from "@/lib/db";
|
} from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type SearchParams = Promise<{ replied?: string; error?: string }>;
|
type SearchParams = Promise<{ replied?: string; error?: string }>;
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ import { ContentCard } from "@/components/public/ui";
|
|||||||
import { auth } from "@/lib/auth";
|
import { auth } from "@/lib/auth";
|
||||||
import { db, Guilds } from "@/lib/db";
|
import { db, Guilds } from "@/lib/db";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type SearchParams = Promise<{ error?: string }>;
|
type SearchParams = Promise<{ error?: string }>;
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { db, Guilds, GuildsForumsThreads, User } from "@/lib/db";
|
import { db, Guilds, GuildsForumsThreads, User } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type SearchParams = Promise<{ posted?: string }>;
|
type SearchParams = Promise<{ posted?: string }>;
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ import { avatarImageUrl } from "@/lib/format";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type GuildView = {
|
type GuildView = {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { db, Guilds } from "@/lib/db";
|
import { db, Guilds } from "@/lib/db";
|
||||||
import { excerpt } from "@/lib/format";
|
import { excerpt } from "@/lib/format";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "Guilds" };
|
export const metadata = { title: "Guilds" };
|
||||||
|
|
||||||
type GuildCard = {
|
type GuildCard = {
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ import { db, WebsiteHelpCenterCategories } from "@/lib/db";
|
|||||||
import { resolveHotelName } from "@/lib/hotel-name";
|
import { resolveHotelName } from "@/lib/hotel-name";
|
||||||
import { sanitize } from "@/lib/sanitize";
|
import { sanitize } from "@/lib/sanitize";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
// Asset path matches AtomCMS's Blade view: asset('/assets/images/help-center/<image_url>').
|
// Asset path matches AtomCMS's Blade view: asset('/assets/images/help-center/<image_url>').
|
||||||
const HELP_IMAGE_BASE = "/assets/images/help-center";
|
const HELP_IMAGE_BASE = "/assets/images/help-center";
|
||||||
|
|
||||||
|
|||||||
@@ -9,10 +9,6 @@ import {
|
|||||||
WebsiteRules,
|
WebsiteRules,
|
||||||
} from "@/lib/db";
|
} from "@/lib/db";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type HelpCategory = {
|
type HelpCategory = {
|
||||||
id: bigint;
|
id: bigint;
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -15,10 +15,6 @@ import {
|
|||||||
} from "@/lib/db";
|
} from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type SearchParams = Promise<{
|
type SearchParams = Promise<{
|
||||||
replied?: string;
|
replied?: string;
|
||||||
closed?: string;
|
closed?: string;
|
||||||
|
|||||||
@@ -9,10 +9,6 @@ import { auth } from "@/lib/auth";
|
|||||||
import { db, WebsiteHelpCenterTickets } from "@/lib/db";
|
import { db, WebsiteHelpCenterTickets } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type SearchParams = Promise<{ created?: string; error?: string }>;
|
type SearchParams = Promise<{ created?: string; error?: string }>;
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ import { SiteHeader } from "@/components/site-header";
|
|||||||
import { TopHeader } from "@/components/top-header";
|
import { TopHeader } from "@/components/top-header";
|
||||||
import { auth } from "@/lib/auth";
|
import { auth } from "@/lib/auth";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Public site chrome. Route group `(site)` keeps this off `/admin` and `/client`,
|
* Public site chrome. Route group `(site)` keeps this off `/admin` and `/client`,
|
||||||
* so housekeeping is never constrained by the public max-w-7xl grid.
|
* so housekeeping is never constrained by the public max-w-7xl grid.
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ import { db, User, UsersCurrency, UsersSettings } from "@/lib/db";
|
|||||||
import { avatarImageUrl } from "@/lib/format";
|
import { avatarImageUrl } from "@/lib/format";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "Leaderboard" };
|
export const metadata = { title: "Leaderboard" };
|
||||||
|
|
||||||
// Currency type ids (see UsersCurrency in src/db/schema.ts):
|
// Currency type ids (see UsersCurrency in src/db/schema.ts):
|
||||||
|
|||||||
@@ -15,10 +15,6 @@ import { resolveHotelName } from "@/lib/hotel-name";
|
|||||||
import { captchaConfig } from "@/lib/services/captcha";
|
import { captchaConfig } from "@/lib/services/captcha";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function LoginPage() {
|
export default async function LoginPage() {
|
||||||
const t = await getTranslations("pages.login");
|
const t = await getTranslations("pages.login");
|
||||||
const th = await getTranslations("header");
|
const th = await getTranslations("header");
|
||||||
|
|||||||
@@ -2,10 +2,6 @@ import LogoGenerator from "@/components/public/logo-generator";
|
|||||||
import { ContentCard } from "@/components/public/ui";
|
import { ContentCard } from "@/components/public/ui";
|
||||||
import { resolveHotelName } from "@/lib/hotel-name";
|
import { resolveHotelName } from "@/lib/hotel-name";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "Logo generator" };
|
export const metadata = { title: "Logo generator" };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,10 +3,6 @@ import { ContentCard } from "@/components/public/ui";
|
|||||||
import { resolveHotelName } from "@/lib/hotel-name";
|
import { resolveHotelName } from "@/lib/hotel-name";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function MaintenancePage() {
|
export default async function MaintenancePage() {
|
||||||
const t = await getTranslations("pages.maintenance");
|
const t = await getTranslations("pages.maintenance");
|
||||||
const [hotel, message] = await Promise.all([
|
const [hotel, message] = await Promise.all([
|
||||||
|
|||||||
@@ -4,10 +4,6 @@ import { ContentCard, EmptyState, StatBlock } from "@/components/public/ui";
|
|||||||
import { db, MarketplaceItems, User } from "@/lib/db";
|
import { db, MarketplaceItems, User } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "Marketplace" };
|
export const metadata = { title: "Marketplace" };
|
||||||
|
|
||||||
// state == 1 → an active, unsold offer in the Arcturus marketplace.
|
// state == 1 → an active, unsold offer in the Arcturus marketplace.
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ import { resolveHotelName } from "@/lib/hotel-name";
|
|||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
import CopyReferralButton from "./CopyReferralButton";
|
import CopyReferralButton from "./CopyReferralButton";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "My dashboard" };
|
export const metadata = { title: "My dashboard" };
|
||||||
|
|
||||||
type SearchParams = Promise<{ claimed?: string; error?: string }>;
|
type SearchParams = Promise<{ claimed?: string; error?: string }>;
|
||||||
|
|||||||
@@ -21,10 +21,6 @@ import { avatarImageUrl } from "@/lib/format";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type SearchParams = Promise<{
|
type SearchParams = Promise<{
|
||||||
accepted?: string;
|
accepted?: string;
|
||||||
declined?: string;
|
declined?: string;
|
||||||
|
|||||||
@@ -21,10 +21,6 @@ import { excerpt } from "@/lib/format";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { sanitize } from "@/lib/sanitize";
|
import { sanitize } from "@/lib/sanitize";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type SearchParams = Promise<{
|
type SearchParams = Promise<{
|
||||||
comment?: string;
|
comment?: string;
|
||||||
reaction?: string;
|
reaction?: string;
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ import { db, WebsiteArticles } from "@/lib/db";
|
|||||||
import { excerpt } from "@/lib/format";
|
import { excerpt } from "@/lib/format";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "News" };
|
export const metadata = { title: "News" };
|
||||||
|
|
||||||
export default async function NewsPage() {
|
export default async function NewsPage() {
|
||||||
|
|||||||
@@ -21,10 +21,6 @@ import { resolveHotelName } from "@/lib/hotel-name";
|
|||||||
import { captchaConfig } from "@/lib/services/captcha";
|
import { captchaConfig } from "@/lib/services/captcha";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
async function getHotelData() {
|
async function getHotelData() {
|
||||||
const [hotelName, imagerRaw, logo] = await Promise.all([
|
const [hotelName, imagerRaw, logo] = await Promise.all([
|
||||||
resolveHotelName(),
|
resolveHotelName(),
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { CameraWeb, db } from "@/lib/db";
|
import { CameraWeb, db } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "Photos" };
|
export const metadata = { title: "Photos" };
|
||||||
|
|
||||||
type Photo = {
|
type Photo = {
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ import {
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { PollVoteForm } from "./poll-vote-form";
|
import { PollVoteForm } from "./poll-vote-form";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function PollDetailPage({
|
export default async function PollDetailPage({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ import { db, WebsitePoll, WebsitePollQuestion } from "@/lib/db";
|
|||||||
import { excerpt } from "@/lib/format";
|
import { excerpt } from "@/lib/format";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "Polls" };
|
export const metadata = { title: "Polls" };
|
||||||
|
|
||||||
export default async function PollsPage() {
|
export default async function PollsPage() {
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ import { auth } from "@/lib/auth";
|
|||||||
import { db, RadioApplications } from "@/lib/db";
|
import { db, RadioApplications } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
const accent =
|
const accent =
|
||||||
tone === "error" ? "var(--color-danger)" : "var(--color-primary)";
|
tone === "error" ? "var(--color-danger)" : "var(--color-primary)";
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ import { ContentCard } from "@/components/public/ui";
|
|||||||
import { db, RadioContests } from "@/lib/db";
|
import { db, RadioContests } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function RadioContestDetailPage({
|
export default async function RadioContestDetailPage({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { db, RadioContests } from "@/lib/db";
|
import { db, RadioContests } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function RadioContestsPage() {
|
export default async function RadioContestsPage() {
|
||||||
const t = await getTranslations("pages.radioContests");
|
const t = await getTranslations("pages.radioContests");
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ import { ContentCard } from "@/components/public/ui";
|
|||||||
import { db, RadioGiveaways } from "@/lib/db";
|
import { db, RadioGiveaways } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function RadioGiveawayDetailPage({
|
export default async function RadioGiveawayDetailPage({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { db, RadioGiveaways } from "@/lib/db";
|
import { db, RadioGiveaways } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function RadioGiveawaysPage() {
|
export default async function RadioGiveawaysPage() {
|
||||||
const t = await getTranslations("pages.radioGiveaways");
|
const t = await getTranslations("pages.radioGiveaways");
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,6 @@ import Link from "next/link";
|
|||||||
import { getTranslations } from "next-intl/server";
|
import { getTranslations } from "next-intl/server";
|
||||||
import type { ReactNode } from "react";
|
import type { ReactNode } from "react";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
const RADIO_SIDEBAR_LINKS = [
|
const RADIO_SIDEBAR_LINKS = [
|
||||||
{ key: "schedule", href: "/radio/schedule", icon: "🗓️" },
|
{ key: "schedule", href: "/radio/schedule", icon: "🗓️" },
|
||||||
{ key: "shouts", href: "/radio/shouts", icon: "📣" },
|
{ key: "shouts", href: "/radio/shouts", icon: "📣" },
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ import { db } from "@/lib/db";
|
|||||||
import { avatarImageUrl } from "@/lib/format";
|
import { avatarImageUrl } from "@/lib/format";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type LeaderRow = {
|
type LeaderRow = {
|
||||||
username: string;
|
username: string;
|
||||||
look: string;
|
look: string;
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import { ContentCard, EmptyState, OnlineBadge } from "@/components/public/ui";
|
|||||||
import { db, RadioSchedules, User } from "@/lib/db";
|
import { db, RadioSchedules, User } from "@/lib/db";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
// Radio config + today's schedule are read live from the DB / settings table.
|
// Radio config + today's schedule are read live from the DB / settings table.
|
||||||
|
|
||||||
// Canonical weekday order so today's slots come out chronologically and we can
|
// Canonical weekday order so today's slots come out chronologically and we can
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ import { auth } from "@/lib/auth";
|
|||||||
import { db, RadioSongRequests, User } from "@/lib/db";
|
import { db, RadioSongRequests, User } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type SearchParams = Promise<{ posted?: string; error?: string }>;
|
type SearchParams = Promise<{ posted?: string; error?: string }>;
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
|
|||||||
@@ -3,10 +3,6 @@ import { getTranslations } from "next-intl/server";
|
|||||||
import { ContentCard, EmptyState } from "@/components/public/ui";
|
import { ContentCard, EmptyState } from "@/components/public/ui";
|
||||||
import { db, RadioSchedules, User } from "@/lib/db";
|
import { db, RadioSchedules, User } from "@/lib/db";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
// Weekly order so the table reads Monday → Sunday regardless of insert order.
|
// Weekly order so the table reads Monday → Sunday regardless of insert order.
|
||||||
// The `day` column stores a free-form string; we key case-insensitively.
|
// The `day` column stores a free-form string; we key case-insensitively.
|
||||||
const DAYS = [
|
const DAYS = [
|
||||||
|
|||||||
@@ -9,10 +9,6 @@ import { avatarImageUrl } from "@/lib/format";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type SearchParams = Promise<{ posted?: string; error?: string }>;
|
type SearchParams = Promise<{ posted?: string; error?: string }>;
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
|
|||||||
@@ -12,10 +12,6 @@ import { db, User } from "@/lib/db";
|
|||||||
import { avatarImageUrl } from "@/lib/format";
|
import { avatarImageUrl } from "@/lib/format";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "Rankings" };
|
export const metadata = { title: "Rankings" };
|
||||||
|
|
||||||
type TopUser = {
|
type TopUser = {
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { db, WebsiteRareValueCategories, WebsiteRareValues } from "@/lib/db";
|
import { db, WebsiteRareValueCategories, WebsiteRareValues } from "@/lib/db";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type RareRow = {
|
type RareRow = {
|
||||||
id: bigint;
|
id: bigint;
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { db, WebsiteRareValueCategories, WebsiteRareValues } from "@/lib/db";
|
import { db, WebsiteRareValueCategories, WebsiteRareValues } from "@/lib/db";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "Rare values" };
|
export const metadata = { title: "Rare values" };
|
||||||
|
|
||||||
type CategoryRow = {
|
type CategoryRow = {
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ import { auth } from "@/lib/auth";
|
|||||||
import { db, User } from "@/lib/db";
|
import { db, User } from "@/lib/db";
|
||||||
import RedeemForm from "./RedeemForm";
|
import RedeemForm from "./RedeemForm";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function RedeemPage() {
|
export default async function RedeemPage() {
|
||||||
const session = await auth();
|
const session = await auth();
|
||||||
if (!session?.user?.id) redirect("/login");
|
if (!session?.user?.id) redirect("/login");
|
||||||
|
|||||||
@@ -15,10 +15,6 @@ import { resolveHotelName } from "@/lib/hotel-name";
|
|||||||
import { captchaConfig } from "@/lib/services/captcha";
|
import { captchaConfig } from "@/lib/services/captcha";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function RegisterPage() {
|
export default async function RegisterPage() {
|
||||||
const th = await getTranslations("header");
|
const th = await getTranslations("header");
|
||||||
const tpr = await getTranslations("pages.register");
|
const tpr = await getTranslations("pages.register");
|
||||||
|
|||||||
@@ -3,10 +3,6 @@ import { getTranslations } from "next-intl/server";
|
|||||||
import { resetPassword } from "@/actions/password-reset";
|
import { resetPassword } from "@/actions/password-reset";
|
||||||
import { ContentCard } from "@/components/public/ui";
|
import { ContentCard } from "@/components/public/ui";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function ResetPage({
|
export default async function ResetPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import { notFound } from "next/navigation";
|
|||||||
import { ContentCard, EmptyState, StatBlock } from "@/components/public/ui";
|
import { ContentCard, EmptyState, StatBlock } from "@/components/public/ui";
|
||||||
import { db, Rooms, User } from "@/lib/db";
|
import { db, Rooms, User } from "@/lib/db";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
// Arcturus stores room access as a short string on rooms.state. Map each known
|
// Arcturus stores room access as a short string on rooms.state. Map each known
|
||||||
// value to a friendly label + lock icon; unknown values fall back to the raw
|
// value to a friendly label + lock icon; unknown values fall back to the raw
|
||||||
// string so we never hide a real (future) state from the visitor.
|
// string so we never hide a real (future) state from the visitor.
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ import { db, Rooms, User } from "@/lib/db";
|
|||||||
import { avatarImageUrl } from "@/lib/format";
|
import { avatarImageUrl } from "@/lib/format";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata: Metadata = { title: "Search" };
|
export const metadata: Metadata = { title: "Search" };
|
||||||
|
|
||||||
type SearchParams = Promise<{ q?: string }>;
|
type SearchParams = Promise<{ q?: string }>;
|
||||||
|
|||||||
@@ -15,10 +15,6 @@ import { totpKeyUri } from "@/lib/auth/totp";
|
|||||||
import { db, User } from "@/lib/db";
|
import { db, User } from "@/lib/db";
|
||||||
import { resolveHotelName } from "@/lib/hotel-name";
|
import { resolveHotelName } from "@/lib/hotel-name";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function TwoFactorPage({
|
export default async function TwoFactorPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ import { db, User } from "@/lib/db";
|
|||||||
import { avatarImageUrl } from "@/lib/format";
|
import { avatarImageUrl } from "@/lib/format";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function SettingsPage() {
|
export default async function SettingsPage() {
|
||||||
const t = await getTranslations("pages.settings");
|
const t = await getTranslations("pages.settings");
|
||||||
const session = await auth();
|
const session = await auth();
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ import { auth } from "@/lib/auth";
|
|||||||
import { db, WebsiteLoginLogs } from "@/lib/db";
|
import { db, WebsiteLoginLogs } from "@/lib/db";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type SearchParams = Promise<{ signedOutAll?: string }>;
|
type SearchParams = Promise<{ signedOutAll?: string }>;
|
||||||
|
|
||||||
/** Tiny user-agent → "Browser on OS" summary (no dependency). */
|
/** Tiny user-agent → "Browser on OS" summary (no dependency). */
|
||||||
|
|||||||
@@ -9,10 +9,6 @@ import { db, WebsiteShopArticles, WebsiteShopCategories } from "@/lib/db";
|
|||||||
import { excerpt } from "@/lib/format";
|
import { excerpt } from "@/lib/format";
|
||||||
import { creditsPerUnit } from "@/lib/services/paypal";
|
import { creditsPerUnit } from "@/lib/services/paypal";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "Shop" };
|
export const metadata = { title: "Shop" };
|
||||||
|
|
||||||
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
function feedbackStyle(tone: "success" | "error"): CSSProperties {
|
||||||
|
|||||||
@@ -11,10 +11,6 @@ import {
|
|||||||
} from "@/lib/services/paypal";
|
} from "@/lib/services/paypal";
|
||||||
import TopUpForm from "./TopUpForm";
|
import TopUpForm from "./TopUpForm";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function TopUpPage({
|
export default async function TopUpPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import { ContentCard, EmptyState } from "@/components/public/ui";
|
|||||||
import { db, User, WebsiteTeams } from "@/lib/db";
|
import { db, User, WebsiteTeams } from "@/lib/db";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "Staff" };
|
export const metadata = { title: "Staff" };
|
||||||
|
|
||||||
type StaffMember = {
|
type StaffMember = {
|
||||||
|
|||||||
@@ -28,10 +28,6 @@ import { avatarImageUrl } from "@/lib/format";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type SearchParams = Promise<{
|
type SearchParams = Promise<{
|
||||||
friend?: string;
|
friend?: string;
|
||||||
guestbook?: string;
|
guestbook?: string;
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import { getTranslations } from "next-intl/server";
|
|||||||
import { isValidVerificationToken } from "@/actions/email-verify";
|
import { isValidVerificationToken } from "@/actions/email-verify";
|
||||||
import { db, User } from "@/lib/db";
|
import { db, User } from "@/lib/db";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type Status = "verified" | "already" | "invalid" | "unavailable";
|
type Status = "verified" | "already" | "invalid" | "unavailable";
|
||||||
|
|
||||||
function StatusCard({
|
function StatusCard({
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import { StatusCard } from "@/components/admin/dashboard";
|
|||||||
import { Achievements, db } from "@/lib/db";
|
import { Achievements, db } from "@/lib/db";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type Achievement = {
|
type Achievement = {
|
||||||
name: string;
|
name: string;
|
||||||
category: string;
|
category: string;
|
||||||
|
|||||||
@@ -9,10 +9,6 @@ import { db, WebsiteAds } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { EditAdDeleteButton } from "../edit-ad-delete-button";
|
import { EditAdDeleteButton } from "../edit-ad-delete-button";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function EditAd({
|
export default async function EditAd({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import { createAd } from "@/actions/admin-ads";
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function NewAd() {
|
export default async function NewAd() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.PAGES_EDIT, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.PAGES_EDIT, session.user.rank)) {
|
||||||
|
|||||||
@@ -9,10 +9,6 @@ import { formatDate } from "@/lib/format-date";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { AdsTable } from "./ads-table";
|
import { AdsTable } from "./ads-table";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function AdminAds() {
|
export default async function AdminAds() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.PAGES_VIEW, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.PAGES_VIEW, session.user.rank)) {
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ import { AlertLogs, db } from "@/lib/db";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
const CRITICAL = new Set(["critical", "error", "danger"]);
|
const CRITICAL = new Set(["critical", "error", "danger"]);
|
||||||
const WARNING = new Set(["warning", "warn"]);
|
const WARNING = new Set(["warning", "warn"]);
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ import { Ban, db, User } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { redisCache } from "@/lib/redis-cache";
|
import { redisCache } from "@/lib/redis-cache";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type DayRow = {
|
type DayRow = {
|
||||||
label: string;
|
label: string;
|
||||||
chats: number;
|
chats: number;
|
||||||
|
|||||||
@@ -16,10 +16,6 @@ import {
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { redisCache } from "@/lib/redis-cache";
|
import { redisCache } from "@/lib/redis-cache";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type EconomyData = {
|
type EconomyData = {
|
||||||
totalCredits: number;
|
totalCredits: number;
|
||||||
totalPixels: number;
|
totalPixels: number;
|
||||||
|
|||||||
@@ -17,10 +17,6 @@ import { Ban, db, Rooms, RoomTradeLog, User } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { redisCache } from "@/lib/redis-cache";
|
import { redisCache } from "@/lib/redis-cache";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type AnalyticsData = {
|
type AnalyticsData = {
|
||||||
totalUsers: number;
|
totalUsers: number;
|
||||||
onlineUsers: number;
|
onlineUsers: number;
|
||||||
|
|||||||
@@ -9,10 +9,6 @@ import { db, User, WebsiteStaffApplications } from "@/lib/db";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type ApplicationRow = {
|
type ApplicationRow = {
|
||||||
id: bigint;
|
id: bigint;
|
||||||
userId: number;
|
userId: number;
|
||||||
|
|||||||
@@ -9,10 +9,6 @@ import { Button } from "@/components/ui/button";
|
|||||||
import { db, WebsiteArticles } from "@/lib/db";
|
import { db, WebsiteArticles } from "@/lib/db";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function EditArticle({
|
export default async function EditArticle({
|
||||||
params,
|
params,
|
||||||
searchParams,
|
searchParams,
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ import { createArticle } from "@/actions/admin-articles";
|
|||||||
import { ArticleForm } from "@/components/admin/article-form";
|
import { ArticleForm } from "@/components/admin/article-form";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function NewArticle({
|
export default async function NewArticle({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -11,10 +11,6 @@ import { db, User, WebsiteArticles } from "@/lib/db";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function AdminArticles({
|
export default async function AdminArticles({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ import { Button } from "@/components/ui/button";
|
|||||||
import { db, WebsiteBadges } from "@/lib/db";
|
import { db, WebsiteBadges } from "@/lib/db";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export const metadata = { title: "Badges" };
|
export const metadata = { title: "Badges" };
|
||||||
|
|
||||||
export default async function AdminBadges({
|
export default async function AdminBadges({
|
||||||
|
|||||||
@@ -4,10 +4,6 @@ import { db, WebsiteBanner } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { BannersManager } from "./banners-manager";
|
import { BannersManager } from "./banners-manager";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function BannersPage() {
|
export default async function BannersPage() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.BANNERS_VIEW, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.BANNERS_VIEW, session.user.rank)) {
|
||||||
|
|||||||
@@ -11,10 +11,6 @@ import { Ban, db } from "@/lib/db";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function AdminBans() {
|
export default async function AdminBans() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.BANS_VIEW, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.BANS_VIEW, session.user.rank)) {
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ import { CalendarCampaigns, CalendarRewards, db } from "@/lib/db";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type Campaign = {
|
type Campaign = {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ import { CalendarCampaigns, CalendarRewards, db } from "@/lib/db";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
type Campaign = {
|
type Campaign = {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -9,10 +9,6 @@ import { loadCatalogItemsData } from "@/lib/services/catalog-items-loader";
|
|||||||
import { getAncestors } from "@/lib/services/catalog-tree";
|
import { getAncestors } from "@/lib/services/catalog-tree";
|
||||||
import { CatalogDetailTabs } from "./catalog-detail-tabs";
|
import { CatalogDetailTabs } from "./catalog-detail-tabs";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function CatalogEditPage({
|
export default async function CatalogEditPage({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -4,10 +4,6 @@ import { CatalogItemsBc, CatalogPagesBc, db } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { BcPageDetail } from "../bc-manager";
|
import { BcPageDetail } from "../bc-manager";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function BcPageDetailPage({
|
export default async function BcPageDetailPage({
|
||||||
params: paramsPromise,
|
params: paramsPromise,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default function BuilderClubPage() {
|
export default function BuilderClubPage() {
|
||||||
redirect("/admin/catalog?catalog=bc");
|
redirect("/admin/catalog?catalog=bc");
|
||||||
}
|
}
|
||||||
@@ -31,10 +31,6 @@ import { CatalogManagerDialog } from "./catalog-manager-dialog-wrapper";
|
|||||||
import { CatalogTable } from "./catalog-table";
|
import { CatalogTable } from "./catalog-table";
|
||||||
import { CatalogViewToggle } from "./catalog-view-toggle";
|
import { CatalogViewToggle } from "./catalog-view-toggle";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
async function rawRows<T>(query: ReturnType<typeof sql>): Promise<T[]> {
|
async function rawRows<T>(query: ReturnType<typeof sql>): Promise<T[]> {
|
||||||
const [rows] = (await db.execute(query)) as unknown as [T[], unknown];
|
const [rows] = (await db.execute(query)) as unknown as [T[], unknown];
|
||||||
return rows ?? [];
|
return rows ?? [];
|
||||||
|
|||||||
@@ -18,10 +18,6 @@ import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
|||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
import { CommandocentrumControls } from "./commandocentrum-controls";
|
import { CommandocentrumControls } from "./commandocentrum-controls";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
function decodeStacktrace(raw: unknown): string {
|
function decodeStacktrace(raw: unknown): string {
|
||||||
if (raw == null) return "";
|
if (raw == null) return "";
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import { Card, CardContent } from "@/components/ui/card";
|
|||||||
import { db, EmulatorErrors } from "@/lib/db";
|
import { db, EmulatorErrors } from "@/lib/db";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function EmulatorErrorsPage({
|
export default async function EmulatorErrorsPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ import { db, EmulatorErrors, EmulatorSettings } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { HealthCheckClient } from "./health-check-client";
|
import { HealthCheckClient } from "./health-check-client";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
async function getDevOpsData() {
|
async function getDevOpsData() {
|
||||||
const now = Math.floor(Date.now() / 1000);
|
const now = Math.floor(Date.now() / 1000);
|
||||||
const dayAgo = now - 86400;
|
const dayAgo = now - 86400;
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ import { Button } from "@/components/ui/button";
|
|||||||
import { db, EmailTemplates } from "@/lib/db";
|
import { db, EmailTemplates } from "@/lib/db";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function AdminEmailTemplates() {
|
export default async function AdminEmailTemplates() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.PAGES_VIEW, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.PAGES_VIEW, session.user.rank)) {
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ import { Button } from "@/components/ui/button";
|
|||||||
import { db, EmulatorSettings, EmulatorTexts } from "@/lib/db";
|
import { db, EmulatorSettings, EmulatorTexts } from "@/lib/db";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
const TEXTS_LIMIT = 300;
|
const TEXTS_LIMIT = 300;
|
||||||
|
|
||||||
export default async function AdminEmulator() {
|
export default async function AdminEmulator() {
|
||||||
|
|||||||
@@ -12,10 +12,6 @@ import { EventPrizesManager } from "./event-prizes";
|
|||||||
import { EventRegistrations } from "./event-registrations";
|
import { EventRegistrations } from "./event-registrations";
|
||||||
import { EventWinnersManager } from "./event-winners";
|
import { EventWinnersManager } from "./event-winners";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function EventDetailPage({
|
export default async function EventDetailPage({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import { db, WebsiteEventType } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { EventForm } from "../event-form";
|
import { EventForm } from "../event-form";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function CreateEventPage() {
|
export default async function CreateEventPage() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.EVENTS_EDIT, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.EVENTS_EDIT, session.user.rank)) {
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ import { db, WebsiteEvent, WebsiteEventType } from "@/lib/db";
|
|||||||
import { PERMS } from "@/lib/permissions";
|
import { PERMS } from "@/lib/permissions";
|
||||||
import { EventsTable } from "./events-table";
|
import { EventsTable } from "./events-table";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function EventsPage({
|
export default async function EventsPage({
|
||||||
params: paramsPromise,
|
params: paramsPromise,
|
||||||
searchParams,
|
searchParams,
|
||||||
|
|||||||
@@ -4,10 +4,6 @@ import { db, WebsiteEventType } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { EventTypesManager } from "./event-types-manager";
|
import { EventTypesManager } from "./event-types-manager";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function EventTypesPage() {
|
export default async function EventTypesPage() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.EVENTS_EDIT, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.EVENTS_EDIT, session.user.rank)) {
|
||||||
|
|||||||
@@ -4,10 +4,6 @@ import { db, WebsiteSetting } from "@/lib/db";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { FaviconForm } from "./favicon-form";
|
import { FaviconForm } from "./favicon-form";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function AdminFaviconPage() {
|
export default async function AdminFaviconPage() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.SETTINGS_VIEW, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.SETTINGS_VIEW, session.user.rank)) {
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ import { db, Guilds, GuildsForumsThreads, GuildsMembers, User } from "@/lib/db";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function AdminGuildDetailPage({
|
export default async function AdminGuildDetailPage({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -12,10 +12,6 @@ import { db, Guilds, GuildsMembers, User } from "@/lib/db";
|
|||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function AdminGuildsPage({
|
export default async function AdminGuildsPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ import { Button } from "@/components/ui/button";
|
|||||||
import { db, WebsiteHelpCenterCategories } from "@/lib/db";
|
import { db, WebsiteHelpCenterCategories } from "@/lib/db";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function EditHelpQuestion({
|
export default async function EditHelpQuestion({
|
||||||
params,
|
params,
|
||||||
searchParams,
|
searchParams,
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import { createHelpQuestion } from "@/actions/admin-help";
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function NewHelpQuestion({
|
export default async function NewHelpQuestion({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ import { Button } from "@/components/ui/button";
|
|||||||
import { db, WebsiteHelpCenterCategories } from "@/lib/db";
|
import { db, WebsiteHelpCenterCategories } from "@/lib/db";
|
||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function AdminHelpQuestions() {
|
export default async function AdminHelpQuestions() {
|
||||||
const { session, permissions } = await getAdminContext();
|
const { session, permissions } = await getAdminContext();
|
||||||
if (!canAccess(permissions, PERMS.PAGES_VIEW, session.user.rank)) {
|
if (!canAccess(permissions, PERMS.PAGES_VIEW, session.user.rank)) {
|
||||||
|
|||||||
@@ -17,10 +17,6 @@ import {
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { AdminHelpTicketDetail } from "./admin-help-ticket-detail";
|
import { AdminHelpTicketDetail } from "./admin-help-ticket-detail";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function AdminHelpTicketDetailPage({
|
export default async function AdminHelpTicketDetailPage({
|
||||||
params,
|
params,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -25,10 +25,6 @@ import { formatDate } from "@/lib/format-date";
|
|||||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||||
import { type HelpTicketRow, HelpTicketsTable } from "./help-tickets-table";
|
import { type HelpTicketRow, HelpTicketsTable } from "./help-tickets-table";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function AdminHelpTicketsPage({
|
export default async function AdminHelpTicketsPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
|||||||
import { getAuditLogs } from "@/lib/services/audit";
|
import { getAuditLogs } from "@/lib/services/audit";
|
||||||
import { AuditSection, ExportSection } from "./client";
|
import { AuditSection, ExportSection } from "./client";
|
||||||
|
|
||||||
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
|
|
||||||
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
|
|
||||||
export const instant = false;
|
|
||||||
|
|
||||||
export default async function AdminHousekeeping({
|
export default async function AdminHousekeeping({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
Loaded 100 of 203 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user