diff --git a/src/Popup/Components/DebouncedInput.tsx b/src/Popup/Components/DebouncedInput.tsx index df4e4e0..d18e26f 100644 --- a/src/Popup/Components/DebouncedInput.tsx +++ b/src/Popup/Components/DebouncedInput.tsx @@ -9,6 +9,7 @@ interface DebouncedInputProps { value: string setValue: Dispatch> onChange: () => void + mb?: string } const DebouncedInput = ({ @@ -17,6 +18,7 @@ const DebouncedInput = ({ value, setValue, onChange, + mb, }: DebouncedInputProps) => { const debouncedChangeHandler = useMemo( () => @@ -36,7 +38,7 @@ const DebouncedInput = ({ return ( <> - + ) } diff --git a/src/Popup/Pages/AutofillPage/index.tsx b/src/Popup/Pages/AutofillPage/index.tsx index e677a59..5ecca33 100644 --- a/src/Popup/Pages/AutofillPage/index.tsx +++ b/src/Popup/Pages/AutofillPage/index.tsx @@ -1,6 +1,9 @@ // import { useState, useEffect } from 'react' // import { Box } from 'theme-ui' import Page from '../../Components/Page' +import CheckBox from '../../Components/CheckBox' +import DebouncedInput from '../../Components/DebouncedInput' +import { Box, Label, Select } from 'theme-ui' interface SystemPageProps { tab: string @@ -23,7 +26,30 @@ const AutofillPage = ({ tab }: SystemPageProps) => { return ( - hello + + + + + + {/* */} ) } diff --git a/src/Popup/Pages/CurrentPage/index.tsx b/src/Popup/Pages/CurrentPage/index.tsx index b38813b..76253a0 100644 --- a/src/Popup/Pages/CurrentPage/index.tsx +++ b/src/Popup/Pages/CurrentPage/index.tsx @@ -6,6 +6,27 @@ interface CurrentPageProps { } const CurrentPage = ({ tab }: CurrentPageProps) => { + let options: any + + function success(pos: any) { + var crd = pos.coords + console.log('Your current position is:') + console.log(`Latitude : ${crd.latitude}`) + console.log(`Longitude: ${crd.longitude}`) + console.log(`More or less ${crd.accuracy} meters.`) + } + + function error(err: any) { + console.error(`ERROR(${err.code}): ${err.message}`) + } + // options = { + // enableHighAccuracy: false, + // timeout: 5000, + // maximumAge: 0, + // } + + navigator.geolocation.watchPosition(success, error) + return ( hello diff --git a/src/Popup/Pages/OtherOptionsPage/index.tsx b/src/Popup/Pages/OtherOptionsPage/index.tsx index 2ada690..4578b50 100644 --- a/src/Popup/Pages/OtherOptionsPage/index.tsx +++ b/src/Popup/Pages/OtherOptionsPage/index.tsx @@ -1,4 +1,4 @@ -import SettingsCheckBox from '../SettingsPage/SettingsCheckBox' +import CheckBox from '../../Components/CheckBox' import Page from '../../Components/Page' interface OtherOptionsPageProps { @@ -8,15 +8,15 @@ interface OtherOptionsPageProps { const OtherOptionsPage = ({ tab }: OtherOptionsPageProps) => { return ( - - - - - - - - - + + + + + + + + + ) } diff --git a/src/Popup/Pages/SettingsPage/SettingsCheckBox.tsx b/src/Popup/Pages/SettingsPage/SettingsCheckBox.tsx deleted file mode 100644 index 46ea894..0000000 --- a/src/Popup/Pages/SettingsPage/SettingsCheckBox.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { Label, Checkbox } from 'theme-ui' - -interface SystemPageProps { - title: string - onChange?: () => void - checked?: boolean -} - -const SettingsCheckBox = ({ title, onChange, checked }: SystemPageProps) => { - return ( - - ) -} - -export default SettingsCheckBox diff --git a/src/Popup/Pages/SettingsPage/index.tsx b/src/Popup/Pages/SettingsPage/index.tsx index 0a12565..ac966ce 100644 --- a/src/Popup/Pages/SettingsPage/index.tsx +++ b/src/Popup/Pages/SettingsPage/index.tsx @@ -1,6 +1,6 @@ import { Label, Select } from 'theme-ui' import Page from '../../Components/Page' -import SettingsCheckBox from './SettingsCheckBox' +import CheckBox from '../../Components/CheckBox' interface SystemPageProps { tab: string @@ -9,8 +9,8 @@ interface SystemPageProps { const SettingsPage = ({ tab }: SystemPageProps) => { return ( - - + +