Skip to content

Commit

Permalink
restructure file numbering
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Jun 30, 2024
1 parent 493fc5b commit 7e9ec57
Show file tree
Hide file tree
Showing 32 changed files with 101 additions and 101 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"build": "next build",
"build:analyze": "cross-env ANALYZE=true next build",
"dev": "next dev",
"dev": "next dev --turbo",
"fmt": "pnpm run format",
"format": "biome check --write --unsafe",
"lint": "biome check",
Expand All @@ -16,10 +16,10 @@
"@ariakit/react": "^0.4.7",
"@emotion/styled": "^11.11.5",
"@mui/icons-material": "^5.15.21",
"@next/third-parties": "15.0.0-canary.44",
"@next/third-parties": "v15.0.0-canary.49",
"clsx": "^2.1.1",
"match-sorter": "^6.3.4",
"next": "15.0.0-canary.44",
"next": "v15.0.0-canary.49",
"next-nprogress-bar": "^2.3.12",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
Expand All @@ -34,7 +34,7 @@
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@next/bundle-analyzer": "15.0.0-canary.44",
"@next/bundle-analyzer": "v15.0.0-canary.49",
"@types/node": "^20.14.9",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
Expand Down
138 changes: 69 additions & 69 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/app/api/auth/callback/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { REDIRECT_TO_COOKIE, TOKEN_COOKIE } from "@/utils/constants.ts";
import { makeApiRequest } from "@/utils/make-api-request";
import { makeApiRequest } from "@/utils/make-api-request.ts";
import { type NextRequest, NextResponse } from "next/server";

export async function GET(request: NextRequest) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/guilds/[guildId]/export-levels/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TOKEN_COOKIE } from "@/utils/constants.ts";
import { isSnowflake } from "@/utils/is-snowflake.ts";
import { makeApiRequest } from "@/utils/make-api-request";
import { makeApiRequest } from "@/utils/make-api-request.ts";
import type { NextRequest } from "next/server";

export async function GET(request: NextRequest, { params: { guildId } }: { params: { guildId: string } }) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/guilds/[guildId]/danger/actions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use server";

import { TOKEN_COOKIE } from "@/utils/constants.ts";
import { makeApiRequest } from "@/utils/make-api-request";
import { makeApiRequest } from "@/utils/make-api-request.ts";
import { snowflake } from "@/utils/schemas.ts";
import { revalidateTag } from "next/cache";
import { cookies } from "next/headers";
Expand Down
2 changes: 1 addition & 1 deletion src/app/guilds/[guildId]/import/01-leveling-import.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { BotSelector } from "./02-bot-selector.tsx";
import { IncludeRoleRewards } from "./03-include-role-rewards.tsx";
import { ImportUntil } from "./04-import-until.tsx";
import { getOngoingImportStatus, importBotData } from "./actions.ts";
import { BeginImportButton } from "./being-import-button.tsx";
import { BeginImportButton } from "./begin-import-button.tsx";
import { ImportStatus, ImportStatusTitle, StartImportError } from "./import-status.tsx";

export function ImportForm({ guildId, data }: { guildId: Snowflake; data: GetImportStatusResponse | null }) {
Expand Down
26 changes: 13 additions & 13 deletions src/app/guilds/[guildId]/leveling/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ import { UnknownGuildOrMissingAccess } from "../unknown-guild.tsx";
import { LevelingChannelMode } from "./01-leveling-channel-mode.tsx";
import { LevelingChannels } from "./02-leveling-channels.tsx";
import { LevelingInThreads } from "./03-leveling-in-threads.tsx";
import { NoLevelingRoles } from "./04-no-leveling-roles.tsx";
import { DisallowedLevelingPrefixes } from "./05-disallowed-leveling-prefixes.tsx";
import { TopLevelingRole } from "./06-top-leveling-role.tsx";
import { NoTopLevelingRoles } from "./07-no-top-leveling-roles.tsx";
import { LevelUpMessageChannel } from "./08-level-up-message-channel.tsx";
import { LevelUpMessage } from "./09-level-up-message.tsx";
import { LevelUpMessageConditions } from "./10-level-up-message-conditions.tsx";
import { LevelingRoleRewards } from "./11-leveling-role-rewards.tsx";
import { StackRoleRewards } from "./12-stack-role-rewards.tsx";
import { NoRoleRewardsRoles } from "./13-no-role-rewards-roles.tsx";
import { AutomaticallyResetLevels } from "./14-automatically-reset-levels.tsx";
import { DefaultRankCardColor } from "./15-default-rank-card-color.tsx";
import { LeaderboardVanity } from "./16-leaderboard-vanity.tsx";
import { NoLevelingRoles } from "./10-no-leveling-roles.tsx";
import { DisallowedLevelingPrefixes } from "./11-disallowed-leveling-prefixes.tsx";
import { TopLevelingRole } from "./20-top-leveling-role.tsx";
import { NoTopLevelingRoles } from "./21-no-top-leveling-roles.tsx";
import { LevelUpMessageChannel } from "./30-level-up-message-channel.tsx";
import { LevelUpMessage } from "./31-level-up-message.tsx";
import { LevelUpMessageConditions } from "./32-level-up-message-conditions.tsx";
import { LevelingRoleRewards } from "./40-leveling-role-rewards.tsx";
import { StackRoleRewards } from "./41-stack-role-rewards.tsx";
import { NoRoleRewardsRoles } from "./42-no-role-rewards-roles.tsx";
import { AutomaticallyResetLevels } from "./50-automatically-reset-levels.tsx";
import { DefaultRankCardColor } from "./60-default-rank-card-color.tsx";
import { LeaderboardVanity } from "./70-leaderboard-vanity.tsx";
import { update } from "./update.ts";

export default async function Leveling({ params: { guildId } }: { readonly params: { guildId: Snowflake } }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"use client";

import { RoleMultipliers } from "@/app/guilds/[guildId]/multipliers/04-role-multipliers";
import { RoleMultiplierPriority } from "@/app/guilds/[guildId]/multipliers/05-role-multiplier-priority";
import { ChannelMultipliers } from "@/app/guilds/[guildId]/multipliers/06-channel-multipliers";
import { Separator } from "@/components/Separator.tsx";
import { Section } from "@/components/dashboard/Section.tsx";
import { Text } from "@/components/dashboard/Text.tsx";
import type { Guild, GuildSettings } from "@/lib/guild.ts";
import { useState } from "react";
import { RoleMultipliers } from "./11-role-multipliers.tsx";
import { RoleMultiplierPriority } from "./12-role-multiplier-priority.tsx";
import { ChannelMultipliers } from "./13-channel-multipliers.tsx";

export function MultipliersWithTargets({ guild, settings }: MultipliersProps) {
const [multiplierCount, setMultiplierCount] = useState(settings.xpMultipliers.length);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import "client-only";
// The reason for using "client-only" instead of "use client" is because of the function parameter in the component,
// which triggers a warning since functions are not serializable.

import { CreateMultiplierButton } from "@/app/guilds/[guildId]/multipliers/create-multiplier-button.tsx";
import { Input } from "@/components/dashboard/Input.tsx";
import { Label } from "@/components/dashboard/Label.tsx";
import { RoleSelector } from "@/components/dashboard/RoleSelector.tsx";
Expand All @@ -18,6 +17,7 @@ import { getMaximumLimit } from "@/utils/get-maximum-limit.ts";
import { mapRoleIdsToRoles } from "@/utils/map-role-ids-to-roles.ts";
import { AddComment, Delete } from "@mui/icons-material";
import { type Dispatch, type SetStateAction, useState } from "react";
import { CreateMultiplierButton } from "./create-multiplier-button.tsx";

export function RoleMultipliers({
multipliers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import "client-only";
// The reason for using "client-only" instead of "use client" is because of the function parameter in the component,
// which triggers a warning since functions are not serializable.

import { CreateMultiplierButton } from "@/app/guilds/[guildId]/multipliers/create-multiplier-button.tsx";
import { ChannelSelector } from "@/components/dashboard/ChannelSelector.tsx";
import { Input } from "@/components/dashboard/Input.tsx";
import { Label } from "@/components/dashboard/Label.tsx";
Expand All @@ -18,6 +17,7 @@ import { getMaximumLimit } from "@/utils/get-maximum-limit.ts";
import { mapChannelIdsToChannels } from "@/utils/map-channel-ids-to-channels.ts";
import { AddComment, Delete } from "@mui/icons-material";
import { type Dispatch, type SetStateAction, useState } from "react";
import { CreateMultiplierButton } from "./create-multiplier-button.tsx";

export function ChannelMultipliers({
channels,
Expand Down
4 changes: 2 additions & 2 deletions src/app/guilds/[guildId]/multipliers/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { getGuildSettings } from "@/app/guilds/[guildId]/get-guild-data.ts";
import { VoteBoost } from "@/app/guilds/[guildId]/multipliers/01-vote-boost.tsx";
import { MultipliersWithTargets } from "@/app/guilds/[guildId]/multipliers/03-multipliers-with-targets.tsx";
import { Separator } from "@/components/Separator.tsx";
import { Form } from "@/components/dashboard/Form.tsx";
import { Section } from "@/components/dashboard/Section.tsx";
Expand All @@ -10,6 +8,8 @@ import type { Metadata } from "next";
import { cookies } from "next/headers";
import { UnknownGuildOrMissingAccess } from "../unknown-guild.tsx";
import { GlobalMultipliers } from "./01-global-multipliers.tsx";
import { VoteBoost } from "./02-vote-boost.tsx";
import { MultipliersWithTargets } from "./10-multipliers-with-targets.tsx";
import { update } from "./update.ts";

export default async function Multipliers({ params: { guildId } }: { readonly params: { guildId: Snowflake } }) {
Expand Down
6 changes: 3 additions & 3 deletions src/app/guilds/[guildId]/roles/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { cookies } from "next/headers";
import { UnknownGuildOrMissingAccess } from "../unknown-guild.tsx";
import { OnJoinRoles } from "./01-on-join-roles.tsx";
import { OnJoinRolesDelay } from "./02-on-join-roles-delay.tsx";
import { OnJoinRolesForBadges } from "./03-on-join-roles-for-badges.tsx";
import { MentionCooldownRoles } from "./04-mention-cooldown-roles.tsx";
import { MentionCooldown } from "./05-mention-cooldown.tsx";
import { OnJoinRolesForBadges } from "./10-on-join-roles-for-badges.tsx";
import { MentionCooldownRoles } from "./20-mention-cooldown-roles.tsx";
import { MentionCooldown } from "./21-mention-cooldown.tsx";
import { update } from "./update.ts";

export default async function Roles({ params: { guildId } }: { readonly params: { guildId: Snowflake } }) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import premiumImg from "@/assets/showcases/premium.png";
import rankCardsImg from "@/assets/showcases/rank-cards.png";
import roleRewardsImg from "@/assets/showcases/role-rewards.png";
import { ExternalLink } from "@/components/ExternalLink.tsx";
import { Showcase } from "@/components/Showcase";
import { Showcase } from "@/components/Showcase.tsx";
import { BOT_INVITE } from "@/shared-links.mjs";
import { formatNumber } from "@/utils/format-number.ts";
import { makeApiRequest } from "@/utils/make-api-request.ts";
Expand Down

0 comments on commit 7e9ec57

Please sign in to comment.