diff --git a/platforms/pictique/src/lib/fragments/Profile/Profile.svelte b/platforms/pictique/src/lib/fragments/Profile/Profile.svelte index 8e890c83..f681acc5 100644 --- a/platforms/pictique/src/lib/fragments/Profile/Profile.svelte +++ b/platforms/pictique/src/lib/fragments/Profile/Profile.svelte @@ -1,23 +1,40 @@
@@ -36,7 +53,33 @@
{#if variant === 'other'}
- +
+ +
{/if} diff --git a/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte b/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte index 791c4348..64ee1a79 100644 --- a/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte +++ b/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte @@ -27,6 +27,7 @@ let error = $state(null); let loading = $state(true); let ownerId: string | null = $derived(getAuthId()); + let isFollowing = $state(false); let ownerProfile = $derived.by(async () => { if (ownerId) { const response = await apiClient.get(`/api/users/${ownerId}`); @@ -50,10 +51,13 @@ async function handleFollow() { try { + isFollowing = true; await apiClient.post(`/api/users/${profileId}/follow`); - await fetchProfile(); // Refresh profile to update follower count + // await fetchProfile(); // Refresh profile to update follower count } catch (err) { error = err instanceof Error ? err.message : 'Failed to follow user'; + } finally { + isFollowing = false; } } @@ -94,6 +98,7 @@ {:else if profile} handlePostClick(post)}