Replies: 1 comment
-
I'm pretty sure it's because you're using // DataTable.tsx
const fetcher = useFetcher()
const handleClick = async () => {
const data = getSelectedData();
try {
if (data != null) {
fetcher.submit(data, {
action: '/notebook/archive',
method: 'post',
encType: 'application/json',
});
}
} catch (error) {
console.log(error);
throw error;
}
}; The rest of your code should work correctly. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello guys, I am having a problem redirecting to a dynamic route in Remix. I send a post request to
/notebook/archive
when clicked on a button from theDataTable
componentDataTable.tsx
When the button is clicked, the
action
function is called in thenotebook/archive
, we get then document from redis and the we use thedocument.id
to select the dynamic route.notebook/archive
Redirect is called but the browsor stays in
/notebook/archive
rather than going to/notebook/archive/id
.After redirect:
Beta Was this translation helpful? Give feedback.
All reactions