mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 08:52:26 +00:00
fix useTrackRef in EditView
This commit is contained in:
parent
63d1a0cc8d
commit
9cd8fbb272
@ -80,7 +80,7 @@ const ApiTokenCreateView = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleSubmit = async (body, actions) => {
|
const handleSubmit = async (body, actions) => {
|
||||||
trackUsageRef(isCreating ? 'willCreateToken' : 'willEditToken');
|
trackUsageRef.current(isCreating ? 'willCreateToken' : 'willEditToken');
|
||||||
lockApp();
|
lockApp();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -97,7 +97,9 @@ const ApiTokenCreateView = () => {
|
|||||||
message: formatMessage({ id: 'notification.success.saved', defaultMessage: 'Saved' }),
|
message: formatMessage({ id: 'notification.success.saved', defaultMessage: 'Saved' }),
|
||||||
});
|
});
|
||||||
|
|
||||||
trackUsageRef(isCreating ? 'didCreateToken' : 'didEditToken', { type: apiToken.type });
|
trackUsageRef.current(isCreating ? 'didCreateToken' : 'didEditToken', {
|
||||||
|
type: apiToken.type,
|
||||||
|
});
|
||||||
|
|
||||||
if (isCreating) {
|
if (isCreating) {
|
||||||
history.replace(`/settings/api-tokens/${response.id}`, { apiToken: response });
|
history.replace(`/settings/api-tokens/${response.id}`, { apiToken: response });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user