mirror of
https://github.com/NohamR/lanyard-profile-readme.git
synced 2026-05-25 20:00:40 +00:00
chore(next): updating nextjs version to latest
This commit is contained in:
@@ -7,9 +7,9 @@ export const dynamic = "force-dynamic";
|
||||
|
||||
export async function GET(
|
||||
req: NextRequest,
|
||||
options: { params: { id: string[] } },
|
||||
options: { params: Promise<{ id: string[] }> },
|
||||
) {
|
||||
const userId = options.params.id.join("/");
|
||||
const userId = (await options.params).id.join("/");
|
||||
|
||||
if (!userId)
|
||||
return Response.json(
|
||||
|
||||
@@ -153,11 +153,9 @@ export default function Home() {
|
||||
className={`${onImageLoaded ? "" : "animate-pulse rounded-md bg-[#3d3d43]"}`}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
"aria-hidden": true,
|
||||
}}
|
||||
animate={{
|
||||
opacity: onImageLoaded ? 1 : 0,
|
||||
"aria-hidden": onImageLoaded ? false : true,
|
||||
}}
|
||||
transition={{ duration: 0.5 }}
|
||||
src={`/api/${userData?.userId}`}
|
||||
|
||||
110
src/utils/parameter.ts
Normal file
110
src/utils/parameter.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
export type Parameters = {
|
||||
theme?: string;
|
||||
bg?: string;
|
||||
clanbg?: string;
|
||||
animated?: string;
|
||||
animatedDecoration?: string;
|
||||
hideDiscrim?: string;
|
||||
hideStatus?: string;
|
||||
hideTimestamp?: string;
|
||||
hideBadges?: string;
|
||||
hideProfile?: string;
|
||||
hideActivity?: string;
|
||||
hideSpotify?: string;
|
||||
hideClan?: string;
|
||||
hideDecoration?: string;
|
||||
ignoreAppId?: string;
|
||||
showDisplayName?: string;
|
||||
borderRadius?: string;
|
||||
idleMessage?: string;
|
||||
};
|
||||
|
||||
export const ParameterInfo: Array<
|
||||
| {
|
||||
parameter: string;
|
||||
type: "boolean";
|
||||
title: string;
|
||||
description?: string;
|
||||
options?: {
|
||||
defaultBool?: boolean;
|
||||
};
|
||||
}
|
||||
| {
|
||||
parameter: string;
|
||||
type: "string";
|
||||
title: string;
|
||||
description?: string;
|
||||
options?: {
|
||||
prefix?: string;
|
||||
suffix?: string;
|
||||
};
|
||||
}
|
||||
| {
|
||||
parameter: string;
|
||||
type: "list";
|
||||
title: string;
|
||||
description?: string;
|
||||
options: {
|
||||
list: Array<{
|
||||
name: string;
|
||||
value: string;
|
||||
}>;
|
||||
};
|
||||
}
|
||||
> = [
|
||||
{
|
||||
parameter: "theme",
|
||||
type: "list",
|
||||
title: "Theme",
|
||||
description:
|
||||
'This will change the background and the font colors, but the background can be overridden with the "Background Color" parameter.',
|
||||
options: {
|
||||
list: [
|
||||
{
|
||||
name: "Light",
|
||||
value: "light",
|
||||
},
|
||||
{
|
||||
name: "Dark",
|
||||
value: "dark",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
parameter: "bg",
|
||||
type: "string",
|
||||
title: "Background Color",
|
||||
description:
|
||||
"This will change the background color. Must be in hex format.",
|
||||
options: {
|
||||
prefix: "#",
|
||||
},
|
||||
},
|
||||
{
|
||||
parameter: "borderRadius",
|
||||
type: "string",
|
||||
title: "Border Radius",
|
||||
description: "This will change the border radius of the card.",
|
||||
options: {
|
||||
suffix: "px",
|
||||
},
|
||||
},
|
||||
{
|
||||
parameter: "animated",
|
||||
type: "boolean",
|
||||
title: "Toggle Animated Avatar",
|
||||
description:
|
||||
"If you have an animated avatar, but don't want it animated, this is the right option.",
|
||||
options: {
|
||||
defaultBool: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
parameter: "idleMessage",
|
||||
type: "string",
|
||||
title: "Idle Message",
|
||||
description:
|
||||
"If you don't want the default \"I'm not currently doing anything!\" as your idle message, this is the right option.",
|
||||
},
|
||||
];
|
||||
@@ -1,6 +1,6 @@
|
||||
import Redis from "ioredis";
|
||||
|
||||
const redis = new Redis(process.env.REDIS_URL, {
|
||||
const redis = new Redis(process.env.REDIS_URL!, {
|
||||
connectTimeout: 1000,
|
||||
lazyConnect: false,
|
||||
maxRetriesPerRequest: 1,
|
||||
|
||||
Reference in New Issue
Block a user