completionId: cgen-57fb054955e44229ae22adf3a50da5ca
cgen-57fb054955e44229ae22adf3a50da5ca
This commit is contained in:
parent
160ae02dfb
commit
3a887b3529
1 changed files with 46 additions and 0 deletions
|
|
@ -120,6 +120,52 @@ export default function ArtistSettings() {
|
|||
fetchProfile();
|
||||
}, [user, navigate]);
|
||||
|
||||
const handleSubmitVerification = async () => {
|
||||
if (!user) return;
|
||||
|
||||
setIsSubmittingVerification(true);
|
||||
try {
|
||||
const response = await fetch("/api/ethos/verification", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"x-user-id": user.id,
|
||||
},
|
||||
body: JSON.stringify({
|
||||
action: "submit",
|
||||
submission_notes: submissionNotes,
|
||||
portfolio_links: portfolioLinks
|
||||
.split("\n")
|
||||
.filter((link) => link.trim()),
|
||||
}),
|
||||
});
|
||||
|
||||
if (response.ok) {
|
||||
const { data } = await response.json();
|
||||
setVerificationStatus({
|
||||
status: "pending",
|
||||
submitted_at: data.submitted_at,
|
||||
});
|
||||
setSubmissionNotes("");
|
||||
setPortfolioLinks("");
|
||||
toast.success({
|
||||
title: "Verification request submitted",
|
||||
description:
|
||||
"Your application has been sent to the Ethos Guild team for review. You'll be notified via email of any updates.",
|
||||
});
|
||||
} else {
|
||||
throw new Error("Failed to submit verification request");
|
||||
}
|
||||
} catch (error) {
|
||||
toast.error({
|
||||
title: "Error",
|
||||
description: String(error),
|
||||
});
|
||||
} finally {
|
||||
setIsSubmittingVerification(false);
|
||||
}
|
||||
};
|
||||
|
||||
const toggleSkill = (skill: string) => {
|
||||
setProfile((prev) => ({
|
||||
...prev,
|
||||
|
|
|
|||
Loading…
Reference in a new issue