refactor(frontend): update API client to match cleaned REST routes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { useAuth } from "@/hooks/use-auth";
|
||||
import { followRemoteUser, RemoteActor } from "@/lib/api";
|
||||
import { followUser, RemoteActor } from "@/lib/api";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { UserAvatar } from "@/components/user-avatar";
|
||||
import { toast } from "sonner";
|
||||
@@ -24,7 +24,7 @@ export function RemoteUserCard({ actor }: RemoteUserCardProps) {
|
||||
}
|
||||
setLoading(true);
|
||||
try {
|
||||
await followRemoteUser(actor.handle, token);
|
||||
await followUser(actor.handle, token);
|
||||
setFollowed(true);
|
||||
toast.success(`Follow request sent to ${actor.handle}`);
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user