Skip to content

Commit

Permalink
More hacks to make cookie clearing work.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudmanic committed Oct 11, 2024
1 parent 7176dce commit 57b178d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ const Account = ({ data: fallbackData }) => {
// Switching to classic tab page.
const [isRevertingToClassicTab, setIsRevertingToClassicTab] = useState(false)
const setBetaOptIn = async (isOptedIn) => {
// eslint-disable-next-line no-undef
document.cookie = 'tabV4OptIn=enabled; Max-Age=-99999999;'

const response = await fetch(apiBetaOptIn, {
method: 'POST',
headers: {
Expand All @@ -295,9 +298,6 @@ const Account = ({ data: fallbackData }) => {
body: JSON.stringify({ optIn: isOptedIn }),
})

// eslint-disable-next-line no-undef
document.cookie = 'tabV4OptIn=enabled; Max-Age=-99999999;'

if (response.ok) {
// Clear local storage.
localStorageMgr.removeItem(STORAGE_NEW_USER_IS_TAB_V4_BETA)
Expand Down

0 comments on commit 57b178d

Please sign in to comment.