mirror of
https://github.com/strapi/strapi.git
synced 2025-11-25 14:41:15 +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' }),
|
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) {
|
} catch (err) {
|
||||||
toggleNotification({
|
toggleNotification({
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
|
|||||||
@ -721,10 +721,13 @@ const UpdateAction: DocumentActionComponent = ({
|
|||||||
/**
|
/**
|
||||||
* TODO: refactor the router so we can just do `../${res.data.documentId}` instead of this.
|
* TODO: refactor the router so we can just do `../${res.data.documentId}` instead of this.
|
||||||
*/
|
*/
|
||||||
navigate({
|
navigate(
|
||||||
pathname: `../${collectionType}/${model}/${res.data.documentId}`,
|
{
|
||||||
search: rawQuery,
|
pathname: `../${collectionType}/${model}/${res.data.documentId}`,
|
||||||
});
|
search: rawQuery,
|
||||||
|
},
|
||||||
|
{ replace: true }
|
||||||
|
);
|
||||||
} else if (
|
} else if (
|
||||||
'error' in res &&
|
'error' in res &&
|
||||||
isBaseQueryError(res.error) &&
|
isBaseQueryError(res.error) &&
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user