Skip to content

Commit 9b5b3c8

Browse files
committed
chore: move files
1 parent 46ae76e commit 9b5b3c8

10 files changed

Lines changed: 35 additions & 13 deletions

File tree

src/app/(dashboard)/guild/[guildId]/page.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
import DebugDisplay from '@components/util/DebugDisplay';
12
import { guild } from '@lib/utils/db';
23
import { getGuildInfo, isGuildManageable } from '@lib/utils/discord';
34
import { getServerSession } from '@lib/utils/serverSession';
45
import type { Guild } from '@prisma/client';
56
import type { APIGuild } from 'discord-api-types/v10';
67
import type { Metadata, ResolvingMetadata } from 'next';
7-
import ConfigScreen from './configScreen';
8-
import NotYetInvitedComponent from './notInvited';
9-
import TestComponent from './tryout';
8+
import ConfigScreen from '../../../../components/pages/guildDetail/configScreen';
9+
import NotYetInvitedComponent from '../../../../components/pages/guildDetail/notInvited';
10+
import TestComponent from '../../../../components/pages/guildDetail/tryout';
1011

1112
interface GuildDetailPageProps {
1213
params: {
@@ -79,10 +80,10 @@ export default async function GuildDetailPage({ params }: GuildDetailPageProps)
7980
<ConfigScreen guildId={guildId} discordData={discordData} databaseData={databaseData} />
8081
<br />
8182
<br />
82-
Database: {JSON.stringify(databaseData)}
83+
<DebugDisplay label="Database" data={JSON.stringify(databaseData)} />
8384
<br />
8485
<br />
85-
Discord: {JSON.stringify(discordData)}
86+
<DebugDisplay label="Discord" data={JSON.stringify(discordData)} />
8687
<br />
8788
<br />
8889
Session Guilds: {JSON.stringify(session?.guilds)}

src/app/(dashboard)/guilds/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { getUserGuilds } from '@lib/utils/oauth';
22
import { getServerSession } from '@lib/utils/serverSession';
33
import { BitField, enumToObject } from '@sapphire/bitfield';
44
import { PermissionFlagsBits } from 'discord-api-types/v10';
5-
import GuildsDisplay from './GuildsDisplay';
5+
import GuildsDisplay from '../../../components/pages/guilds/GuildsDisplay';
66

77
export default async function GuildsPage() {
88
const session = await getServerSession();

src/app/tryout/page.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ export default function TryoutPage(): JSX.Element {
88
const { data: session } = useSession();
99
return (
1010
<>
11-
<h1>Try out</h1>
12-
<h3>Name: Name</h3>
13-
{/* <h3>Name: {session?.user.username}</h3> */}
11+
<h3>Name: {session?.user.username}</h3>
1412
{/* <ProfilePicture session={session} /> */}
1513
<ProfilePicture />
1614
<h2>{BIRTHDAYY_LOGO}</h2>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import Link from 'next/link';
66
function GuildDetailCard({ guild }: GuildDetailCardProps) {
77
return (
88
<div className="GuildDetailCard" key={guild.id}>
9-
<div className="grid-item mx-auto">
9+
<div className="mx-auto grid-item">
1010
<Link href={`/guild/${guild.id}`}>
1111
<div className="card card-compact">
12-
<div className="bg-base-100 text-center">
12+
<div className="text-center bg-base-100">
1313
<Image
1414
src={`https://cdn.discordapp.com/icons/${guild.id}/${guild.icon}.png`}
1515
alt={`${guild.name} Server Icon`}
@@ -20,8 +20,8 @@ function GuildDetailCard({ guild }: GuildDetailCardProps) {
2020
</div>
2121

2222
<div className="card-body">
23-
<div className="card-title text-center">
24-
<p className=" ">{guild.name}</p>
23+
<div className="text-center card-title">
24+
<p className="">{guild.name}</p>
2525
</div>
2626
</div>
2727
</div>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import React, { ReactNode } from 'react';
2+
3+
interface DebugDisplayProps {
4+
label: string;
5+
data: string;
6+
children?: ReactNode;
7+
}
8+
9+
const DebugDisplay: React.FC<DebugDisplayProps> = ({ label, data, children }: DebugDisplayProps) => {
10+
return (
11+
<>
12+
<details tabIndex={0} className="border collapse collapse-arrow border-base-300 bg-base-200">
13+
<summary className="text-xl font-medium collapse-title">DEBUG: {label}</summary>
14+
<div className="collapse-content">
15+
<p>{data}</p>
16+
{children}
17+
</div>
18+
</details>
19+
</>
20+
);
21+
};
22+
23+
export default DebugDisplay;

0 commit comments

Comments
 (0)