mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +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) => {
|
||||
trackUsageRef(isCreating ? 'willCreateToken' : 'willEditToken');
|
||||
trackUsageRef.current(isCreating ? 'willCreateToken' : 'willEditToken');
|
||||
lockApp();
|
||||
|
||||
try {
|
||||
@ -97,7 +97,9 @@ const ApiTokenCreateView = () => {
|
||||
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) {
|
||||
history.replace(`/settings/api-tokens/${response.id}`, { apiToken: response });
|
||||
|
Loading…
x
Reference in New Issue
Block a user