diff --git a/components/about/AboutPage/index.tsx b/components/about/AboutPage/index.tsx index ef00416e..7c196575 100644 --- a/components/about/AboutPage/index.tsx +++ b/components/about/AboutPage/index.tsx @@ -1,11 +1,9 @@ import React from 'react' -import Link from 'next/link' import { Trans, useTranslation } from 'next-i18next' import classNames from 'classnames' import LinkItem from '../LinkItem' -import ShareIcon from '~public/icons/Share.svg' import DiscordIcon from '~public/icons/discord.svg' import GithubIcon from '~public/icons/github.svg' diff --git a/components/about/RoadmapPage/index.tsx b/components/about/RoadmapPage/index.tsx index 72506318..590f3eda 100644 --- a/components/about/RoadmapPage/index.tsx +++ b/components/about/RoadmapPage/index.tsx @@ -1,11 +1,9 @@ import React from 'react' -import Link from 'next/link' import { useTranslation } from 'next-i18next' import classNames from 'classnames' import LinkItem from '~components/about/LinkItem' -import ShareIcon from '~public/icons/Share.svg' import GithubIcon from '~public/icons/github.svg' import styles from './index.module.scss' diff --git a/components/about/UpdatesPage/index.tsx b/components/about/UpdatesPage/index.tsx index 8361ae22..7fe4ee3e 100644 --- a/components/about/UpdatesPage/index.tsx +++ b/components/about/UpdatesPage/index.tsx @@ -3,7 +3,6 @@ import { useTranslation } from 'next-i18next' import classNames from 'classnames' import ContentUpdate from '~components/about/ContentUpdate' -import ChangelogUnit from '~components/about/ChangelogUnit' import styles from './index.module.scss' diff --git a/components/auth/AccountModal/index.tsx b/components/auth/AccountModal/index.tsx index 73ccb9c5..48b50dc2 100644 --- a/components/auth/AccountModal/index.tsx +++ b/components/auth/AccountModal/index.tsx @@ -10,26 +10,15 @@ import DialogFooter from '~components/common/DialogFooter' import DialogContent from '~components/common/DialogContent' import Button from '~components/common/Button' import SelectItem from '~components/common/SelectItem' -import PictureSelectItem from '~components/common/PictureSelectItem' import SelectTableField from '~components/common/SelectTableField' -// import * as Switch from '@radix-ui/react-switch' import api from '~utils/api' import changeLanguage from 'utils/changeLanguage' import { accountState } from '~utils/accountState' import { pictureData } from '~utils/pictureData' -import CrossIcon from '~public/icons/Cross.svg' import styles from './index.module.scss' -type StateVariables = { - [key: string]: boolean - picture: boolean - gender: boolean - language: boolean - theme: boolean -} - interface Props { open: boolean username?: string @@ -55,23 +44,8 @@ const AccountModal = React.forwardRef( const [mounted, setMounted] = useState(false) const { theme: appTheme, setTheme: setAppTheme } = useTheme() - // Cookies - const accountCookie = getCookie('account') - const userCookie = getCookie('user') - - const cookieData = { - account: accountCookie ? JSON.parse(accountCookie as string) : undefined, - user: userCookie ? JSON.parse(userCookie as string) : undefined, - } - // UI State const [open, setOpen] = useState(false) - const [selectOpenState, setSelectOpenState] = useState({ - picture: false, - gender: false, - language: false, - theme: false, - }) // Values const [username, setUsername] = useState(props.username || '') @@ -79,7 +53,6 @@ const AccountModal = React.forwardRef( const [language, setLanguage] = useState(props.language || '') const [gender, setGender] = useState(props.gender || 0) const [theme, setTheme] = useState(props.theme || 'system') - // const [privateProfile, setPrivateProfile] = useState(false) // Setup const [pictureOpen, setPictureOpen] = useState(false) @@ -145,7 +118,6 @@ const AccountModal = React.forwardRef( language: language, gender: gender, theme: theme, - // private: privateProfile, }, } diff --git a/components/character/CharacterSearchFilterBar/index.tsx b/components/character/CharacterSearchFilterBar/index.tsx index 7c67ac13..d30299a6 100644 --- a/components/character/CharacterSearchFilterBar/index.tsx +++ b/components/character/CharacterSearchFilterBar/index.tsx @@ -1,14 +1,10 @@ import React, { useEffect, useState } from 'react' import { useTranslation } from 'next-i18next' - import cloneDeep from 'lodash.clonedeep' -import * as DropdownMenu from '@radix-ui/react-dropdown-menu' - import SearchFilter from '~components/search/SearchFilter' import SearchFilterCheckboxItem from '~components/search/SearchFilterCheckboxItem' -import styles from './index.module.scss' import { emptyElementState, emptyProficiencyState, @@ -16,6 +12,8 @@ import { } from '~utils/emptyStates' import { elements, proficiencies, rarities } from '~utils/stateValues' +import styles from './index.module.scss' + interface Props { sendFilters: (filters: { [key: string]: number[] }) => void } diff --git a/components/character/CharacterUnit/index.tsx b/components/character/CharacterUnit/index.tsx index 312f55a9..45bcf17e 100644 --- a/components/character/CharacterUnit/index.tsx +++ b/components/character/CharacterUnit/index.tsx @@ -1,4 +1,4 @@ -import React, { MouseEvent, useEffect, useState } from 'react' +import React, { useEffect, useState } from 'react' import { useRouter } from 'next/router' import { useSnapshot } from 'valtio' import { Trans, useTranslation } from 'next-i18next' diff --git a/components/common/InputTableField/index.tsx b/components/common/InputTableField/index.tsx index 4bd40d82..8a53c4e6 100644 --- a/components/common/InputTableField/index.tsx +++ b/components/common/InputTableField/index.tsx @@ -3,7 +3,6 @@ import Input from '~components/common/Input' import TableField from '~components/common/TableField' import styles from './index.module.scss' -import classNames from 'classnames' interface Props extends React.DetailedHTMLProps< diff --git a/components/common/PopoverContent/index.tsx b/components/common/PopoverContent/index.tsx index 315d2ae8..1ccc1c68 100644 --- a/components/common/PopoverContent/index.tsx +++ b/components/common/PopoverContent/index.tsx @@ -32,7 +32,7 @@ export const PopoverContent = React.forwardRef( ref={forwardedRef} > {children} - + ) diff --git a/components/common/Segment/index.tsx b/components/common/Segment/index.tsx index 69d3facc..bbc9db4c 100644 --- a/components/common/Segment/index.tsx +++ b/components/common/Segment/index.tsx @@ -1,5 +1,4 @@ import React from 'react' - import styles from './index.module.scss' interface Props { diff --git a/components/common/SelectItem/index.tsx b/components/common/SelectItem/index.tsx index c1072314..af7f8c65 100644 --- a/components/common/SelectItem/index.tsx +++ b/components/common/SelectItem/index.tsx @@ -1,8 +1,8 @@ import React, { ComponentProps } from 'react' +import classNames from 'classnames' import * as Select from '@radix-ui/react-select' import styles from './index.module.scss' -import classNames from 'classnames' interface Props extends ComponentProps<'div'> { value: string | number diff --git a/components/common/Switch/index.tsx b/components/common/Switch/index.tsx index 949fd850..ce83fa30 100644 --- a/components/common/Switch/index.tsx +++ b/components/common/Switch/index.tsx @@ -1,7 +1,6 @@ import React from 'react' -import * as RadixSwitch from '@radix-ui/react-switch' - import classNames from 'classnames' +import * as RadixSwitch from '@radix-ui/react-switch' import styles from './index.module.scss' interface Props diff --git a/components/common/TextFieldset/index.module.scss b/components/common/TextFieldset/index.module.scss deleted file mode 100644 index b69c1e9c..00000000 --- a/components/common/TextFieldset/index.module.scss +++ /dev/null @@ -1,18 +0,0 @@ -.Fieldset textarea { - $offset: 2px; - - background-color: var(--input-bg); - border: $offset solid transparent; - border-radius: $input-corner; - box-sizing: border-box; - color: var(--text-primary); - display: block; - line-height: 21px; - -webkit-font-smoothing: antialiased; - padding: $unit-2x calc($unit-2x - $offset); - - &:focus-within { - border: $offset solid $blue; - outline: none; - } -} diff --git a/components/common/TextFieldset/index.tsx b/components/common/TextFieldset/index.tsx deleted file mode 100644 index 75bafa83..00000000 --- a/components/common/TextFieldset/index.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react' -import styles from './index.module.scss' - -interface Props { - fieldName: string - placeholder: string - value?: string - error: string - onBlur?: (event: React.ChangeEvent) => void - onChange?: (event: React.ChangeEvent) => void -} - -const TextFieldset = React.forwardRef( - function fieldSet(props, ref) { - return ( -
-