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",
|
||||
description: "Confirmed your email address.",
|
||||
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]);
|
||||
|
|
@ -2019,13 +2022,18 @@ export default function Community() {
|
|||
{newMemberSteps.map((step) => {
|
||||
const Icon = step.icon;
|
||||
return (
|
||||
<li key={step.id} className="flex gap-4 group">
|
||||
<div 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"
|
||||
)}>
|
||||
<li
|
||||
key={step.id}
|
||||
className="flex gap-4 group"
|
||||
>
|
||||
<div
|
||||
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 ? (
|
||||
<CheckCircle className="h-5 w-5" />
|
||||
) : (
|
||||
|
|
@ -2033,10 +2041,14 @@ export default function Community() {
|
|||
)}
|
||||
</div>
|
||||
<div className="space-y-1 flex-1">
|
||||
<p className={cn(
|
||||
"font-semibold",
|
||||
step.completed ? "text-emerald-400 line-through" : "text-foreground"
|
||||
)}>
|
||||
<p
|
||||
className={cn(
|
||||
"font-semibold",
|
||||
step.completed
|
||||
? "text-emerald-400 line-through"
|
||||
: "text-foreground",
|
||||
)}
|
||||
>
|
||||
{step.title}
|
||||
</p>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
|
|
@ -2050,13 +2062,14 @@ export default function Community() {
|
|||
size="sm"
|
||||
className="opacity-0 group-hover:opacity-100 transition-opacity"
|
||||
>
|
||||
<Link to="/onboarding">
|
||||
Complete
|
||||
</Link>
|
||||
<Link to="/onboarding">Complete</Link>
|
||||
</Button>
|
||||
)}
|
||||
{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
|
||||
</Badge>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,10 @@ const handleDiscordInteractions = (
|
|||
try {
|
||||
const signature = req.get("x-signature-ed25519");
|
||||
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 publicKey = process.env.DISCORD_PUBLIC_KEY;
|
||||
|
|
@ -26,7 +29,12 @@ const handleDiscordInteractions = (
|
|||
}
|
||||
|
||||
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" });
|
||||
}
|
||||
|
||||
|
|
@ -74,8 +82,14 @@ export function createServer() {
|
|||
res.setHeader("X-Frame-Options", "ALLOWALL");
|
||||
// Allow Discord to access the iframe
|
||||
res.setHeader("Access-Control-Allow-Origin", "*");
|
||||
res.setHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
|
||||
res.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization, x-signature-ed25519, x-signature-timestamp");
|
||||
res.setHeader(
|
||||
"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();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue