From 87cd270128ca20ae66f774ee6fc268cd654b9139 Mon Sep 17 00:00:00 2001 From: svetlagasheva Date: Wed, 4 Aug 2021 12:54:43 +0300 Subject: [PATCH] streamingServerWarningDismissed type fixed --- src/common/ServerWarning/ServerWarning.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/ServerWarning/ServerWarning.js b/src/common/ServerWarning/ServerWarning.js index a60b7f37c..232b44104 100644 --- a/src/common/ServerWarning/ServerWarning.js +++ b/src/common/ServerWarning/ServerWarning.js @@ -13,26 +13,28 @@ const ServerWarning = ({ className }) => { const profile = useProfile(); const onLaterClick = React.useCallback(() => { const streamingServerWarningDismissed = new Date(); + streamingServerWarningDismissed.setMonth(streamingServerWarningDismissed.getMonth() + 1); core.transport.dispatch({ action: 'Ctx', args: { action: 'UpdateSettings', args: { ...profile.settings, - streamingServerWarningDismissed: streamingServerWarningDismissed.setMonth(streamingServerWarningDismissed.getMonth() + 1) + streamingServerWarningDismissed: streamingServerWarningDismissed } } }); }, [profile.settings]); const onDismissedClick = React.useCallback(() => { const streamingServerWarningDismissed = new Date(); + streamingServerWarningDismissed.setFullYear(streamingServerWarningDismissed.getFullYear() + 50); core.transport.dispatch({ action: 'Ctx', args: { action: 'UpdateSettings', args: { ...profile.settings, - streamingServerWarningDismissed: streamingServerWarningDismissed.setFullYear(streamingServerWarningDismissed.getFullYear() + 50) + streamingServerWarningDismissed: streamingServerWarningDismissed } } });