diff --git a/client/components/passport/PassportSummary.tsx b/client/components/passport/PassportSummary.tsx
index 339c1544..d85ef6dc 100644
--- a/client/components/passport/PassportSummary.tsx
+++ b/client/components/passport/PassportSummary.tsx
@@ -223,7 +223,10 @@ const PassportSummary = ({
>
- {getAchievementEmoji(achievement.icon as any, achievement.name)}
+ {getAchievementEmoji(
+ achievement.icon as any,
+ achievement.name,
+ )}
{achievement.name}
diff --git a/client/contexts/AuthContext.tsx b/client/contexts/AuthContext.tsx
index e1966ad3..685b2861 100644
--- a/client/contexts/AuthContext.tsx
+++ b/client/contexts/AuthContext.tsx
@@ -331,7 +331,10 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
if (inviteProcessedRef.current) return;
if (!user) return;
try {
- const qs = typeof window !== "undefined" ? new URLSearchParams(window.location.search) : null;
+ const qs =
+ typeof window !== "undefined"
+ ? new URLSearchParams(window.location.search)
+ : null;
const token = qs?.get("invite");
if (!token) return;
inviteProcessedRef.current = true;
@@ -339,7 +342,10 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
try {
await mod.aethexSocialService.acceptInvite(token, user.id);
try {
- aethexToast.success({ title: "Invitation accepted", description: "You're now connected." });
+ aethexToast.success({
+ title: "Invitation accepted",
+ description: "You're now connected.",
+ });
} catch {}
} catch (e) {
console.warn("Invite accept failed", e);
diff --git a/client/lib/aethex-social-service.ts b/client/lib/aethex-social-service.ts
index f542159e..5a7b60b6 100644
--- a/client/lib/aethex-social-service.ts
+++ b/client/lib/aethex-social-service.ts
@@ -10,13 +10,19 @@ export const aethexSocialService = {
.limit(limit);
if (error) {
- console.error("Failed to load recommended profiles:", (error as any)?.message || error);
+ console.error(
+ "Failed to load recommended profiles:",
+ (error as any)?.message || error,
+ );
return [];
}
return (data || []) as any[];
} catch (error) {
- console.error("Unexpected error loading recommended profiles:", (error as any)?.message || error);
+ console.error(
+ "Unexpected error loading recommended profiles:",
+ (error as any)?.message || error,
+ );
return [];
}
},
@@ -29,13 +35,19 @@ export const aethexSocialService = {
.eq("follower_id", userId);
if (error) {
- console.error("Failed to load following list:", (error as any)?.message || error);
+ console.error(
+ "Failed to load following list:",
+ (error as any)?.message || error,
+ );
return [];
}
return (data as any[]).map((r: any) => r.following_id);
} catch (error) {
- console.error("Unexpected error loading following list:", (error as any)?.message || error);
+ console.error(
+ "Unexpected error loading following list:",
+ (error as any)?.message || error,
+ );
return [];
}
},
@@ -67,17 +79,27 @@ export const aethexSocialService = {
const resp = await fetch("/api/invites", {
method: "POST",
headers: { "Content-Type": "application/json" },
- body: JSON.stringify({ inviter_id: inviterId, invitee_email: email, message }),
+ body: JSON.stringify({
+ inviter_id: inviterId,
+ invitee_email: email,
+ message,
+ }),
});
if (!resp.ok) {
const err = await resp.text();
throw new Error(err || "Failed to send invite");
}
- return (await resp.json()) as { ok: boolean; inviteUrl: string; token: string };
+ return (await resp.json()) as {
+ ok: boolean;
+ inviteUrl: string;
+ token: string;
+ };
},
async listInvites(inviterId: string) {
- const resp = await fetch(`/api/invites?inviter_id=${encodeURIComponent(inviterId)}`);
+ const resp = await fetch(
+ `/api/invites?inviter_id=${encodeURIComponent(inviterId)}`,
+ );
if (!resp.ok) return [];
return await resp.json();
},
@@ -129,7 +151,9 @@ export const aethexSocialService = {
async endorseSkill(endorserId: string, endorsedId: string, skill: string) {
const payload = { endorser_id: endorserId, endorsed_id: endorsedId, skill };
- const { error } = await supabase.from("endorsements").insert(payload as any);
+ const { error } = await supabase
+ .from("endorsements")
+ .insert(payload as any);
if (error) throw new Error(error.message || "Unable to endorse");
await this.applyReward(endorsedId, "endorsement_received", 2);
},
diff --git a/client/pages/Network.tsx b/client/pages/Network.tsx
index 5ceb203f..2c7e6460 100644
--- a/client/pages/Network.tsx
+++ b/client/pages/Network.tsx
@@ -82,7 +82,11 @@ export default function Network() {
toast({ description: "Invitation sent" });
setInviteEmail("");
} catch (e: any) {
- toast({ variant: "destructive", title: "Failed to send invite", description: e?.message || "Try again later" });
+ toast({
+ variant: "destructive",
+ title: "Failed to send invite",
+ description: e?.message || "Try again later",
+ });
} finally {
setInviteSending(false);
}
@@ -94,7 +98,11 @@ export default function Network() {
await aethexSocialService.endorseSkill(user.id, targetId, skill);
toast({ description: `Endorsed for ${skill}` });
} catch (e: any) {
- toast({ variant: "destructive", title: "Failed to endorse", description: e?.message || "Try again later" });
+ toast({
+ variant: "destructive",
+ title: "Failed to endorse",
+ description: e?.message || "Try again later",
+ });
}
};
@@ -252,7 +260,10 @@ export default function Network() {
const p = (c as any).user_profiles || {};
const display = p.full_name || p.username || c.connection_id;
return (
-
+
@@ -260,15 +271,21 @@ export default function Network() {
{display}
-
Connected
+
+ Connected
+
-
+
);
})}
{connections.length === 0 && (
-
No connections yet.
+
+ No connections yet.
+
)}
@@ -330,14 +347,19 @@ export default function Network() {
Endorsements
- Recognize skills of your peers
+
+ Recognize skills of your peers
+
{connections.slice(0, 6).map((c) => {
const p = (c as any).user_profiles || {};
const display = p.full_name || p.username || c.connection_id;
return (
-
+
@@ -346,8 +368,22 @@ export default function Network() {
{display}
- {(["Leadership","Systems","Frontend","Backend"] as const).map((skill) => (
-