From c084a61a7a74e0bf3d7bf0b0fc478415ac5f0df9 Mon Sep 17 00:00:00 2001 From: z0ccc Date: Mon, 1 Aug 2022 21:11:49 -0400 Subject: [PATCH] added scroll bars to whitelist and deleted comments --- src/pages/Popup/WhitelistPage.tsx | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/src/pages/Popup/WhitelistPage.tsx b/src/pages/Popup/WhitelistPage.tsx index 8299793..cf06f13 100644 --- a/src/pages/Popup/WhitelistPage.tsx +++ b/src/pages/Popup/WhitelistPage.tsx @@ -1,13 +1,7 @@ import React, { useState, useEffect } from 'react' -import { Box, Label, Input, Flex, Button, Close, Field } from 'theme-ui' -import LocationInput from './LocationInput' -import ConfigurationSelect from './ConfigurationSelect' -import IPData from './IPData' -import getIP from '../../utils/getIP' +import { Box, Input, Flex, Button, Close } from 'theme-ui' const WhitelistPage = ({ tab }: any) => { - const [ip, setIP] = useState(null) - const [configuration, setConfiguration] = useState('default') const [currentUrl, setCurrentUrl] = useState('') const [whitelist, setWhitelist] = useState([]) @@ -39,10 +33,6 @@ const WhitelistPage = ({ tab }: any) => { !whitelist.includes(e.target.url.value) && setWhitelist((prevWhitelist) => [...prevWhitelist, e.target.url.value]) // detachDebugger() - // chrome.storage.sync.set({ [type]: e.target.value }) - // setCurrentUrl(e.target.value) - // chrome.storage.sync.set({ configuration: 'custom' }) - // setConfiguration('custom') } return ( @@ -55,21 +45,8 @@ const WhitelistPage = ({ tab }: any) => { > Whitelist handleSubmit(e)}> - - + + {whitelist.length ? ( { borderColor: 'grey', p: '2px 8px', my: '8px', + maxHeight: '260px', + overflow: 'auto', }} > {whitelist.map((element, index) => {