diff --git a/src/components/Article/SharePopup.tsx b/src/components/Article/SharePopup.tsx index 90beb439..e5263178 100644 --- a/src/components/Article/SharePopup.tsx +++ b/src/components/Article/SharePopup.tsx @@ -1,7 +1,7 @@ import { Icon } from '../_shared/Icon' import { t } from '../../utils/intl' -import styles from '../_shared/Popup.module.scss' +import styles from '../_shared/Popup/Popup.module.scss' import type { PopupProps } from '../_shared/Popup' import { Popup } from '../_shared/Popup' diff --git a/src/components/Nav/AuthModal/RegisterForm.tsx b/src/components/Nav/AuthModal/RegisterForm.tsx index b5f56fb7..aaefe61d 100644 --- a/src/components/Nav/AuthModal/RegisterForm.tsx +++ b/src/components/Nav/AuthModal/RegisterForm.tsx @@ -123,7 +123,6 @@ export const RegisterForm = () => {
{ id="email" name="email" autocomplete="email" - type="text" + type="email" value={email()} placeholder={t('Email')} onInput={(event) => handleEmailInput(event.currentTarget.value)} diff --git a/src/components/Nav/ProfilePopup.tsx b/src/components/Nav/ProfilePopup.tsx index 6b196f9b..fbd8de48 100644 --- a/src/components/Nav/ProfilePopup.tsx +++ b/src/components/Nav/ProfilePopup.tsx @@ -1,7 +1,7 @@ import { useSession } from '../../context/session' import type { PopupProps } from '../_shared/Popup' import { Popup } from '../_shared/Popup' -import styles from '../_shared/Popup.module.scss' +import styles from '../_shared/Popup/Popup.module.scss' type ProfilePopupProps = Omit diff --git a/src/components/Views/AllAuthors.tsx b/src/components/Views/AllAuthors.tsx index d624ac8b..6f702509 100644 --- a/src/components/Views/AllAuthors.tsx +++ b/src/components/Views/AllAuthors.tsx @@ -41,7 +41,7 @@ export const AllAuthorsView = (props: Props) => { const byLetter = createMemo<{ [letter: string]: Author[] }>(() => { return sortedAuthors().reduce((acc, author) => { let letter = author.name.trim().split(' ').pop().at(0).toUpperCase() - if (!/[А-я]/i.test(letter) && locale() === 'ru') letter = '@' + if (!/[А-Я]/i.test(letter) && locale() === 'ru') letter = '@' if (!acc[letter]) acc[letter] = [] acc[letter].push(author) return acc diff --git a/src/components/_shared/Icon.module.scss b/src/components/_shared/Icon/Icon.module.scss similarity index 100% rename from src/components/_shared/Icon.module.scss rename to src/components/_shared/Icon/Icon.module.scss diff --git a/src/components/_shared/Icon.tsx b/src/components/_shared/Icon/Icon.tsx similarity index 100% rename from src/components/_shared/Icon.tsx rename to src/components/_shared/Icon/Icon.tsx diff --git a/src/components/_shared/Icon/index.ts b/src/components/_shared/Icon/index.ts new file mode 100644 index 00000000..7aebbe9d --- /dev/null +++ b/src/components/_shared/Icon/index.ts @@ -0,0 +1 @@ +export * from './Icon' diff --git a/src/components/_shared/Popup.module.scss b/src/components/_shared/Popup/Popup.module.scss similarity index 100% rename from src/components/_shared/Popup.module.scss rename to src/components/_shared/Popup/Popup.module.scss diff --git a/src/components/_shared/Popup.tsx b/src/components/_shared/Popup/Popup.tsx similarity index 94% rename from src/components/_shared/Popup.tsx rename to src/components/_shared/Popup/Popup.tsx index bfb4ef89..6ffd8c73 100644 --- a/src/components/_shared/Popup.tsx +++ b/src/components/_shared/Popup/Popup.tsx @@ -1,7 +1,7 @@ import { createEffect, createSignal, JSX, Show } from 'solid-js' import styles from './Popup.module.scss' import { clsx } from 'clsx' -import { useOutsideClickHandler } from '../../utils/useOutsideClickHandler' +import { useOutsideClickHandler } from '../../../utils/useOutsideClickHandler' type HorizontalAnchor = 'center' | 'right' diff --git a/src/components/_shared/Popup/index.ts b/src/components/_shared/Popup/index.ts new file mode 100644 index 00000000..5775e5ad --- /dev/null +++ b/src/components/_shared/Popup/index.ts @@ -0,0 +1 @@ +export * from './Popup' diff --git a/src/components/_shared/SearchField.tsx b/src/components/_shared/SearchField.tsx index 4f3555d8..51eee4c8 100644 --- a/src/components/_shared/SearchField.tsx +++ b/src/components/_shared/SearchField.tsx @@ -7,7 +7,7 @@ type SearchFieldProps = { } export const SearchField = (props: SearchFieldProps) => { - const handleInputChange = (event) => props.onChange(event.target.value) + const handleInputChange = (event) => props.onChange(event.target.value.trim()) return (