Prettier format pending files
This commit is contained in:
parent
43f293c081
commit
46445ff6a4
2 changed files with 47 additions and 20 deletions
|
|
@ -930,7 +930,10 @@ export default function Community() {
|
||||||
title: "Email Verified",
|
title: "Email Verified",
|
||||||
description: "Confirmed your email address.",
|
description: "Confirmed your email address.",
|
||||||
icon: CheckCircle,
|
icon: CheckCircle,
|
||||||
completed: Boolean(user?.email_confirmed_at || (user?.user_metadata as any)?.email_verified),
|
completed: Boolean(
|
||||||
|
user?.email_confirmed_at ||
|
||||||
|
(user?.user_metadata as any)?.email_verified,
|
||||||
|
),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}, [user, profile]);
|
}, [user, profile]);
|
||||||
|
|
@ -2019,13 +2022,18 @@ export default function Community() {
|
||||||
{newMemberSteps.map((step) => {
|
{newMemberSteps.map((step) => {
|
||||||
const Icon = step.icon;
|
const Icon = step.icon;
|
||||||
return (
|
return (
|
||||||
<li key={step.id} className="flex gap-4 group">
|
<li
|
||||||
<div className={cn(
|
key={step.id}
|
||||||
"flex h-10 w-10 items-center justify-center rounded-lg transition-all",
|
className="flex gap-4 group"
|
||||||
step.completed
|
>
|
||||||
? "bg-emerald-500/20 text-emerald-400"
|
<div
|
||||||
: "bg-aethex-500/10 text-aethex-300"
|
className={cn(
|
||||||
)}>
|
"flex h-10 w-10 items-center justify-center rounded-lg transition-all",
|
||||||
|
step.completed
|
||||||
|
? "bg-emerald-500/20 text-emerald-400"
|
||||||
|
: "bg-aethex-500/10 text-aethex-300",
|
||||||
|
)}
|
||||||
|
>
|
||||||
{step.completed ? (
|
{step.completed ? (
|
||||||
<CheckCircle className="h-5 w-5" />
|
<CheckCircle className="h-5 w-5" />
|
||||||
) : (
|
) : (
|
||||||
|
|
@ -2033,10 +2041,14 @@ export default function Community() {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-1 flex-1">
|
<div className="space-y-1 flex-1">
|
||||||
<p className={cn(
|
<p
|
||||||
"font-semibold",
|
className={cn(
|
||||||
step.completed ? "text-emerald-400 line-through" : "text-foreground"
|
"font-semibold",
|
||||||
)}>
|
step.completed
|
||||||
|
? "text-emerald-400 line-through"
|
||||||
|
: "text-foreground",
|
||||||
|
)}
|
||||||
|
>
|
||||||
{step.title}
|
{step.title}
|
||||||
</p>
|
</p>
|
||||||
<p className="text-sm text-muted-foreground">
|
<p className="text-sm text-muted-foreground">
|
||||||
|
|
@ -2050,13 +2062,14 @@ export default function Community() {
|
||||||
size="sm"
|
size="sm"
|
||||||
className="opacity-0 group-hover:opacity-100 transition-opacity"
|
className="opacity-0 group-hover:opacity-100 transition-opacity"
|
||||||
>
|
>
|
||||||
<Link to="/onboarding">
|
<Link to="/onboarding">Complete</Link>
|
||||||
Complete
|
|
||||||
</Link>
|
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{step.completed && (
|
{step.completed && (
|
||||||
<Badge variant="outline" className="border-emerald-500/30 bg-emerald-500/10 text-emerald-400">
|
<Badge
|
||||||
|
variant="outline"
|
||||||
|
className="border-emerald-500/30 bg-emerald-500/10 text-emerald-400"
|
||||||
|
>
|
||||||
Done
|
Done
|
||||||
</Badge>
|
</Badge>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,10 @@ const handleDiscordInteractions = (
|
||||||
try {
|
try {
|
||||||
const signature = req.get("x-signature-ed25519");
|
const signature = req.get("x-signature-ed25519");
|
||||||
const timestamp = req.get("x-signature-timestamp");
|
const timestamp = req.get("x-signature-timestamp");
|
||||||
const rawBody = req.body instanceof Buffer ? req.body : Buffer.from(JSON.stringify(req.body), "utf8");
|
const rawBody =
|
||||||
|
req.body instanceof Buffer
|
||||||
|
? req.body
|
||||||
|
: Buffer.from(JSON.stringify(req.body), "utf8");
|
||||||
const bodyString = rawBody.toString("utf8");
|
const bodyString = rawBody.toString("utf8");
|
||||||
|
|
||||||
const publicKey = process.env.DISCORD_PUBLIC_KEY;
|
const publicKey = process.env.DISCORD_PUBLIC_KEY;
|
||||||
|
|
@ -26,7 +29,12 @@ const handleDiscordInteractions = (
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!signature || !timestamp) {
|
if (!signature || !timestamp) {
|
||||||
console.error("[Discord] Missing headers - signature:", !!signature, "timestamp:", !!timestamp);
|
console.error(
|
||||||
|
"[Discord] Missing headers - signature:",
|
||||||
|
!!signature,
|
||||||
|
"timestamp:",
|
||||||
|
!!timestamp,
|
||||||
|
);
|
||||||
return res.status(401).json({ error: "Invalid request" });
|
return res.status(401).json({ error: "Invalid request" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -74,8 +82,14 @@ export function createServer() {
|
||||||
res.setHeader("X-Frame-Options", "ALLOWALL");
|
res.setHeader("X-Frame-Options", "ALLOWALL");
|
||||||
// Allow Discord to access the iframe
|
// Allow Discord to access the iframe
|
||||||
res.setHeader("Access-Control-Allow-Origin", "*");
|
res.setHeader("Access-Control-Allow-Origin", "*");
|
||||||
res.setHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
|
res.setHeader(
|
||||||
res.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization, x-signature-ed25519, x-signature-timestamp");
|
"Access-Control-Allow-Methods",
|
||||||
|
"GET, POST, PUT, DELETE, OPTIONS",
|
||||||
|
);
|
||||||
|
res.setHeader(
|
||||||
|
"Access-Control-Allow-Headers",
|
||||||
|
"Content-Type, Authorization, x-signature-ed25519, x-signature-timestamp",
|
||||||
|
);
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue