implement bookmark delete
This commit is contained in:
@@ -3,9 +3,10 @@ import { useMutation } from "@tanstack/react-query"
|
||||
function useLogin() {
|
||||
return useMutation({
|
||||
mutationFn: async (creds: { username: string; password: string }) => {
|
||||
await fetch("/api/login", {
|
||||
return await fetch(`${import.meta.env.VITE_API_URL}/api/login`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(creds),
|
||||
credentials: "include",
|
||||
})
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user