Closed faridmovsumov closed 9 months ago
I found the solution to the problem. Instead of using
const primaryActions = {
content: 'Create New Upload', onAction() {
app.dispatch(Redirect.toApp({
path: '/create-upload'
}));
}
};
I should use
import {useNavigate} from "react-router-dom";
const navigate = useNavigate();
const primaryActions = {
content: 'Create New Upload', onAction() {
navigate('/create-upload');
}
};
Video explanation of the problem: https://www.loom.com/share/799eb63d75a64e9da14ed5239359e509?sid=e24f3e44-a7ae-41eb-a992-fe64c1068418
I have the following primary action.
After redirecting to the correct page, if I click on the navigation item link, then the page refresh happens.
App ID: 4222617
Versions