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

@@ -35,7 +35,7 @@ export function PostThoughtForm() {
const form = useForm<z.infer<typeof CreateThoughtSchema>>({
resolver: zodResolver(CreateThoughtSchema),
defaultValues: { content: "", visibility: "Public" },
defaultValues: { content: "", visibility: "public" },
});
async function onSubmit(values: z.infer<typeof CreateThoughtSchema>) {
@@ -93,19 +93,24 @@ export function PostThoughtForm() {
</SelectTrigger>
</FormControl>
<SelectContent>
<SelectItem value="Public">
<SelectItem value="public">
<div className="flex items-center gap-2">
<Globe className="h-4 w-4" /> Public
</div>
</SelectItem>
<SelectItem value="FriendsOnly">
<SelectItem value="followers">
<div className="flex items-center gap-2">
<Users className="h-4 w-4" /> Friends Only
<Users className="h-4 w-4" /> Followers
</div>
</SelectItem>
<SelectItem value="Private">
<SelectItem value="unlisted">
<div className="flex items-center gap-2">
<Lock className="h-4 w-4" /> Private
<Lock className="h-4 w-4" /> Unlisted
</div>
</SelectItem>
<SelectItem value="direct">
<div className="flex items-center gap-2">
<Lock className="h-4 w-4" /> Direct
</div>
</SelectItem>
</SelectContent>