feat: update frontend to work with v2 backend — camelCase, new endpoints, nested author
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m38s
test / unit (pull_request) Successful in 16m2s
test / integration (pull_request) Failing after 17m2s

This commit is contained in:
2026-05-14 17:14:27 +02:00
parent 7110f30e16
commit 44385adb6b
17 changed files with 203 additions and 286 deletions

View File

@@ -16,11 +16,9 @@ import {
FormLabel,
FormControl,
FormMessage,
FormDescription,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";
import { TopFriendsCombobox } from "@/components/top-friends-combobox";
interface EditProfileFormProps {
currentUser: Me;
@@ -38,7 +36,6 @@ export function EditProfileForm({ currentUser }: EditProfileFormProps) {
avatarUrl: currentUser.avatarUrl ?? undefined,
headerUrl: currentUser.headerUrl ?? undefined,
customCss: currentUser.customCss ?? undefined,
topFriends: currentUser.topFriends ?? [],
},
});
@@ -135,25 +132,6 @@ export function EditProfileForm({ currentUser }: EditProfileFormProps) {
</FormItem>
)}
/>
<FormField
name="topFriends"
control={form.control}
render={({ field }) => (
<FormItem className="flex flex-col">
<FormLabel>Top Friends</FormLabel>
<FormControl>
<TopFriendsCombobox
value={field.value || []}
onChange={field.onChange}
/>
</FormControl>
<FormDescription>
Select up to 8 of your friends to display on your profile.
</FormDescription>
<FormMessage />
</FormItem>
)}
/>
</CardContent>
<CardFooter className="border-t px-6 py-4">
<Button type="submit" disabled={form.formState.isSubmitting}>