From 19e5199e849ec7c6885dac6551a754d39ac069ec Mon Sep 17 00:00:00 2001 From: z0ccc Date: Sat, 8 Oct 2022 21:06:03 -0400 Subject: [PATCH] Cleaned up user agent logic and added debouced input --- src/Popup/Components/CheckBox.tsx | 4 +- .../DebouncedInput.tsx} | 10 +-- src/Popup/Pages/SystemPage/index.tsx | 10 +-- .../Pages/UserAgentPage/UserAgentSelect.tsx | 50 ----------- src/Popup/Pages/UserAgentPage/index.tsx | 88 +++++++++++-------- src/Popup/Popup.tsx | 6 +- 6 files changed, 68 insertions(+), 100 deletions(-) rename src/Popup/{Pages/SystemPage/SystemInput.tsx => Components/DebouncedInput.tsx} (82%) delete mode 100644 src/Popup/Pages/UserAgentPage/UserAgentSelect.tsx diff --git a/src/Popup/Components/CheckBox.tsx b/src/Popup/Components/CheckBox.tsx index d7a3846..c90f566 100644 --- a/src/Popup/Components/CheckBox.tsx +++ b/src/Popup/Components/CheckBox.tsx @@ -1,12 +1,12 @@ import { Label, Checkbox } from 'theme-ui' -interface SystemPageProps { +interface CheckBoxProps { title: string onChange?: () => void checked?: boolean } -const CheckBox = ({ title, onChange, checked }: SystemPageProps) => { +const CheckBox = ({ title, onChange, checked }: CheckBoxProps) => { return (