···21import { ScreenMessage } from "@/components/screen-message";
22import { Button } from "@/components/ui/button";
23import { cacheOptions } from "@/lib/api";
24-import SadWumpusPic from "@/public/sad-wumpus.gif";
25import { type ApiV1GuildsModulesNotificationsGetResponse, NotificationFlags, NotificationType } from "@/typings";
26import { BitfieldManager, bitfieldToArray } from "@/utils/bitfields";
27import { createSelectableItems } from "@/utils/create-selectable-items";
···53 return (
54 <ScreenMessage
55 top="20vh"
56- title="Something went wrong on this page.."
57 description={error}
58 href={`/dashboard/${guild?.id}`}
59 button="Go back to overview"
60 icon={<HiViewGridAdd />}
61- >
62- <Image src={SadWumpusPic} alt="" height={141} width={124} />
63- </ScreenMessage>
64 );
65 }
66
···21import { ScreenMessage } from "@/components/screen-message";
22import { Button } from "@/components/ui/button";
23import { cacheOptions } from "@/lib/api";
024import { type ApiV1GuildsModulesNotificationsGetResponse, NotificationFlags, NotificationType } from "@/typings";
25import { BitfieldManager, bitfieldToArray } from "@/utils/bitfields";
26import { createSelectableItems } from "@/utils/create-selectable-items";
···52 return (
53 <ScreenMessage
54 top="20vh"
055 description={error}
56 href={`/dashboard/${guild?.id}`}
57 button="Go back to overview"
58 icon={<HiViewGridAdd />}
59+ />
0060 );
61 }
62
+9-7
app/dashboard/[guildId]/starboard/page.tsx
···1"use client";
23-import { Button } from "@nextui-org/react";
4import Image from "next/image";
5import Link from "next/link";
6import { useParams } from "next/navigation";
···16import Switch from "@/components/inputs/switch";
17import TextInput from "@/components/inputs/text-input";
18import Notice from "@/components/notice";
019import { useApi } from "@/lib/api/hook";
20import { type ApiV1GuildsModulesStarboardGetResponse, StarboardStyle } from "@/typings";
21import { createSelectableItems } from "@/utils/create-selectable-items";
···45 return (<>
46 <div className="flex justify-between relative bottom-2 mb-3">
47 <Button
48- className="ml-auto"
49- as={Link}
50- href="/docs/starboard"
51- target="_blank"
52- endContent={<HiExternalLink />}
53 size="sm"
54 >
55- Read docs
00000056 </Button>
57 </div>
58
···1"use client";
203import Image from "next/image";
4import Link from "next/link";
5import { useParams } from "next/navigation";
···15import Switch from "@/components/inputs/switch";
16import TextInput from "@/components/inputs/text-input";
17import Notice from "@/components/notice";
18+import { Button } from "@/components/ui/button";
19import { useApi } from "@/lib/api/hook";
20import { type ApiV1GuildsModulesStarboardGetResponse, StarboardStyle } from "@/typings";
21import { createSelectableItems } from "@/utils/create-selectable-items";
···45 return (<>
46 <div className="flex justify-between relative bottom-2 mb-3">
47 <Button
48+ asChild
000049 size="sm"
50 >
51+ <Link
52+ href="/docs/starboard"
53+ target="_blank"
54+ >
55+ <HiExternalLink />
56+ Read docs
57+ </Link>
58 </Button>
59 </div>
60
+2-10
app/docs/[...pathname]/page.tsx
···1import { Code } from "@nextui-org/react";
2import { readFile } from "fs/promises";
3-import Image from "next/image";
45import { Faq } from "@/app/(home)/faq.component";
6import BeautifyMarkdown from "@/components/markdown";
7import Notice, { NoticeType } from "@/components/notice";
8-import { HomeButton, ScreenMessage, SupportButton } from "@/components/screen-message";
9import metadata from "@/public/docs/meta.json";
10-import SadWumpusPic from "@/public/sad-wumpus.gif";
1112interface Props {
13 params: Promise<{ pathname: string[]; }>;
···26 top="6rem"
27 title="Sadly, this page can not be found.."
28 description="Seems like you got a little lost here? Here's wumpus for now!"
29- buttons={<>
30- <HomeButton />
31- <SupportButton />
32- </>}
33- >
34- <Image src={SadWumpusPic} alt="" height={141} width={124} />
35- </ScreenMessage>
36 );
37 }
38
···1import { Code } from "@nextui-org/react";
2import { readFile } from "fs/promises";
034import { Faq } from "@/app/(home)/faq.component";
5import BeautifyMarkdown from "@/components/markdown";
6import Notice, { NoticeType } from "@/components/notice";
7+import { ScreenMessage } from "@/components/screen-message";
8import metadata from "@/public/docs/meta.json";
0910interface Props {
11 params: Promise<{ pathname: string[]; }>;
···24 top="6rem"
25 title="Sadly, this page can not be found.."
26 description="Seems like you got a little lost here? Here's wumpus for now!"
27+ />
00000028 );
29 }
30
···1import "./globals.css";
23-import { Divider } from "@nextui-org/react";
4import type { Metadata, Viewport } from "next";
5import { Lexend, Noto_Sans_JP, Outfit } from "next/font/google";
6import { cookies } from "next/headers";
···1112import { Header } from "@/components/header";
13import { LoginButton } from "@/components/login-button";
014import { cn } from "@/utils/cn";
15import { getBaseUrl } from "@/utils/urls";
16···182 <span className="text-xl dark:text-neutral-100 text-neutral-900 hidden sm:block">Wamellow</span>
183 </Link>
184185- <Divider
186 className="h-10 rotate-6 mx-3"
187 orientation="vertical"
188 />
···1import "./globals.css";
203import type { Metadata, Viewport } from "next";
4import { Lexend, Noto_Sans_JP, Outfit } from "next/font/google";
5import { cookies } from "next/headers";
···1011import { Header } from "@/components/header";
12import { LoginButton } from "@/components/login-button";
13+import { Separator } from "@/components/ui/separator";
14import { cn } from "@/utils/cn";
15import { getBaseUrl } from "@/utils/urls";
16···182 <span className="text-xl dark:text-neutral-100 text-neutral-900 hidden sm:block">Wamellow</span>
183 </Link>
184185+ <Separator
186 className="h-10 rotate-6 mx-3"
187 orientation="vertical"
188 />
+4-17
app/leaderboard/[guildId]/page.tsx
···1import { cookies } from "next/headers";
2-import Image from "next/image";
3import { redirect } from "next/navigation";
45-import { AddButton, HomeButton, ScreenMessage, SupportButton } from "@/components/screen-message";
6import { getGuild } from "@/lib/api";
7-import SadWumpusPic from "@/public/sad-wumpus.gif";
89import { getPagination, getTopMembers } from "./api";
10import Member from "./member.component";
···47 if (error || !guild || !members || !pagination || "message" in pagination) {
48 return (
49 <ScreenMessage
50- top="0rem"
51- title="Something went wrong on this page.."
52 description={error}
53- buttons={<>
54- <HomeButton />
55- <SupportButton />
56- </>}
57- >
58- <Image src={SadWumpusPic} alt="" height={141 * 1.5} width={124 * 1.5} />
59- </ScreenMessage>
60 );
61 }
6263 if (!Array.isArray(members) || !members.length) {
64 return (
65 <ScreenMessage
66- top="0rem"
67 title="No members to see here.."
68 description="No members could be found on this page"
69- buttons={<>
70- <HomeButton />
71- <AddButton />
72- </>}
73 />
74 );
75 }
···1import { cookies } from "next/headers";
02import { redirect } from "next/navigation";
34+import { ScreenMessage } from "@/components/screen-message";
5import { getGuild } from "@/lib/api";
067import { getPagination, getTopMembers } from "./api";
8import Member from "./member.component";
···45 if (error || !guild || !members || !pagination || "message" in pagination) {
46 return (
47 <ScreenMessage
48+ top="14rem"
049 description={error}
50+ />
00000051 );
52 }
5354 if (!Array.isArray(members) || !members.length) {
55 return (
56 <ScreenMessage
57+ top="14rem"
58 title="No members to see here.."
59 description="No members could be found on this page"
000060 />
61 );
62 }
···1-import Image from "next/image";
2-3-import { AddButton, HomeButton, ScreenMessage } from "@/components/screen-message";
4-import SadWumpusPic from "@/public/sad-wumpus.gif";
56export default function NotFound() {
7 return (
8 <ScreenMessage
9 title="Sadly, this page can not be found.."
10 description="Seems like you got a little lost here? Here's wumpus for now!"
11- buttons={<>
12- <HomeButton />
13- <AddButton />
14- </>}
15- >
16- <Image src={SadWumpusPic} alt="" height={141 * 1.5} width={124 * 1.5} />
17- </ScreenMessage>
18 );
19}
···1+import { ScreenMessage } from "@/components/screen-message";
00023export default function NotFound() {
4 return (
5 <ScreenMessage
6 title="Sadly, this page can not be found.."
7 description="Seems like you got a little lost here? Here's wumpus for now!"
8+ />
0000009 );
10}
+2-2
app/profile/billing/page.tsx
···1"use client";
23import { Turnstile, type TurnstileInstance } from "@marsidev/react-turnstile";
4-import { Link } from "@nextui-org/react";
5import { useRef, useState } from "react";
6import { GrAmex } from "react-icons/gr";
7import { HiCreditCard, HiLightningBolt } from "react-icons/hi";
···115 className="ml-auto"
116 variant="link"
117 >
118- <Link href={data?.portalUrl}>
119 Change
120 </Link>
121 </Button>
···1"use client";
23import { Turnstile, type TurnstileInstance } from "@marsidev/react-turnstile";
4+import Link from "next/link";
5import { useRef, useState } from "react";
6import { GrAmex } from "react-icons/gr";
7import { HiCreditCard, HiLightningBolt } from "react-icons/hi";
···115 className="ml-auto"
116 variant="link"
117 >
118+ <Link href={data!.portalUrl}>
119 Change
120 </Link>
121 </Button>
+2-14
app/profile/connections/page.tsx
···10import DumbTextInput from "@/components/inputs/dumb-text-input";
11import Modal from "@/components/modal";
12import Notice, { NoticeType } from "@/components/notice";
13-import { HomeButton, ScreenMessage, SupportButton } from "@/components/screen-message";
14import { Button } from "@/components/ui/button";
15import { useApi } from "@/lib/api/hook";
16-import SadWumpusPic from "@/public/sad-wumpus.gif";
17import { type ApiV1UsersMeConnectionsGetResponse, ConnectionType } from "@/typings";
18import { cn } from "@/utils/cn";
19···27 const { isLoading, data, error } = useApi<ApiV1UsersMeConnectionsGetResponse[]>(url);
2829 if (error) {
30- return (
31- <ScreenMessage
32- title="Something went wrong on this page.."
33- description={error}
34- buttons={<>
35- <HomeButton />
36- <SupportButton />
37- </>}
38- >
39- <Image src={SadWumpusPic} alt="" height={141} width={124} />
40- </ScreenMessage>
41- );
42 }
4344 if (isLoading || !data) return <></>;
···10import DumbTextInput from "@/components/inputs/dumb-text-input";
11import Modal from "@/components/modal";
12import Notice, { NoticeType } from "@/components/notice";
13+import { ScreenMessage } from "@/components/screen-message";
14import { Button } from "@/components/ui/button";
15import { useApi } from "@/lib/api/hook";
016import { type ApiV1UsersMeConnectionsGetResponse, ConnectionType } from "@/typings";
17import { cn } from "@/utils/cn";
18···26 const { isLoading, data, error } = useApi<ApiV1UsersMeConnectionsGetResponse[]>(url);
2728 if (error) {
29+ return <ScreenMessage description={error} />;
0000000000030 }
3132 if (isLoading || !data) return <></>;
+16-24
app/profile/layout.tsx
···1"use client";
23-import { Chip } from "@nextui-org/react";
4-import Image from "next/image";
5import Link from "next/link";
6import { redirect } from "next/navigation";
7import { useCookies } from "next-client-cookies";
···14import ImageReduceMotion from "@/components/image-reduce-motion";
15import { ListTab } from "@/components/list";
16import { MetricCard, Metrics } from "@/components/metric-card";
17-import { HomeButton, ScreenMessage, SupportButton } from "@/components/screen-message";
018import { Skeleton } from "@/components/ui/skeleton";
19import { cacheOptions, getData } from "@/lib/api";
20-import SadWumpusPic from "@/public/sad-wumpus.gif";
21import type { ApiV1UsersMeGetResponse } from "@/typings";
2223export default function RootLayout({
···50 if (error || (data && "message" in data)) {
51 return (
52 <ScreenMessage
53- title="Something went wrong on this page.."
54 description={
55 (data && "message" in data ? data.message : `${error}`)
56- || "An unknown error occurred."}
57- buttons={<>
58- <HomeButton />
59- <SupportButton />
60- </>}
61- >
62- <Image src={SadWumpusPic} alt="" height={141} width={124} />
63- </ScreenMessage>
64 );
65 }
66···87 {!user?.id ?
88 <div className="flex flex-col mt-2">
89 <Skeleton className="rounded-xl w-32 h-5 mb-2" />
90- <Skeleton className="rounded-md w-24 h-7" />
91 </div>
92 :
93 <div className="flex flex-col gap-1">
94 <div className="text-2xl dark:text-neutral-200 text-neutral-800 font-medium">
95 {user.globalName || user.username}
96 </div>
97- <Chip
98- as={Link}
99 href="/vote"
100 target="_blank"
101- color="secondary"
102- startContent={<HiFire className="ml-1" />}
103- variant="flat"
104- radius="sm"
105 >
106- <span className="font-bold uppercase">
107- {user.extended?.voteCount} votes
108- </span>
109- </Chip>
0000110 </div>
111 }
112 </div>