chore: open options page if no api key is set

This commit is contained in:
abhijithvijayan
2020-02-10 21:32:42 +05:30
parent 3dd2239daa
commit 903a20d6af

View File

@@ -9,6 +9,7 @@ import PopupHeader from './Header';
import PopupBody, { ProcessedRequestProperties } from './PopupBody';
import './styles.scss';
import { openExtOptionsPage } from '../util/tabs';
type DomainOptionsProperties = {
option: string;
@@ -66,7 +67,11 @@ const Popup: React.FC = () => {
setRequestProcessed({ error: true, message: 'Extension requires an API Key to work' });
setLoading(false);
// ToDo: Open options page after slight delay
// Open options page
setTimeout(() => {
return openExtOptionsPage();
}, 1300);
return;
}