diff --git a/src/components/Options.tsx b/src/components/Options.tsx index 46c11e5..156f264 100644 --- a/src/components/Options.tsx +++ b/src/components/Options.tsx @@ -1,7 +1,6 @@ -import { Toast } from 'bootstrap'; -import classNames from 'classnames'; import React, { useEffect, useRef, useState } from 'react'; import config, { SuccessOrFailType } from '../config/config'; +import { IS_CHROME } from '../utils'; import apiKeyInvalid from '../utils/apiKey'; import { logUserIn } from '../utils/user'; import SitesList from './SitesList'; @@ -38,8 +37,6 @@ export default function Options(): JSX.Element { whitelist: '', }); - const liveToastRef = useRef(null); - const loggingStyleRef = useRef(null); const restoreSettings = async (): Promise => { @@ -131,9 +128,10 @@ export default function Options(): JSX.Element { trackSocialMedia, whitelist, }); - // eslint-disable-next-line - Toast.getOrCreateInstance(liveToastRef?.current ?? '')?.show(); await logUserIn(state.apiKey); + if (IS_CHROME) { + window.close(); + } }; const updateBlacklistState = (sites: string) => { @@ -180,15 +178,7 @@ export default function Options(): JSX.Element { const isApiKeyValid = apiKeyInvalid(state.apiKey) === ''; return ( -
+
@@ -363,30 +353,6 @@ export default function Options(): JSX.Element {
-
- -