regarding refresh
Unanswered
TK-ed posted this in #help-forum
TK-edOP
import { useRouter } from "next/navigation";
const router = useRouter();
const { data: tableData, error: tableError } = await supabase
.from("files")
.delete()
.eq("filename", fileName);
console.log(tableData);
if (tableError) {
console.error("Error deleting from table:", tableError);
// Handle error from Supabase table deletion
} else {
console.log("Deleted from table successfully:", tableData);
}
setIsDeleteModalOpen(false);
router.refresh();after calling the delete function i want to refresh the page but it isnt reloading
1 Reply
Can you provide the full code? How do you get the data?