mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 02:44:55 +00:00
fix: navigation issues (#20565)
This commit is contained in:
parent
c89af5f4e3
commit
bbdc5e8aa3
@ -150,7 +150,7 @@ const CreatePage = () => {
|
||||
message: formatMessage({ id: 'Settings.roles.created', defaultMessage: 'created' }),
|
||||
});
|
||||
|
||||
navigate(res.data.id.toString(), { replace: true });
|
||||
navigate(`../roles/${res.data.id.toString()}`, { replace: true });
|
||||
} catch (err) {
|
||||
toggleNotification({
|
||||
type: 'danger',
|
||||
|
||||
@ -721,10 +721,13 @@ const UpdateAction: DocumentActionComponent = ({
|
||||
/**
|
||||
* TODO: refactor the router so we can just do `../${res.data.documentId}` instead of this.
|
||||
*/
|
||||
navigate({
|
||||
pathname: `../${collectionType}/${model}/${res.data.documentId}`,
|
||||
search: rawQuery,
|
||||
});
|
||||
navigate(
|
||||
{
|
||||
pathname: `../${collectionType}/${model}/${res.data.documentId}`,
|
||||
search: rawQuery,
|
||||
},
|
||||
{ replace: true }
|
||||
);
|
||||
} else if (
|
||||
'error' in res &&
|
||||
isBaseQueryError(res.error) &&
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user