postmerge biomed
This commit is contained in:
parent
98e0bb1078
commit
702865b0e6
|
@ -40,15 +40,11 @@ import { InboxPage } from '../pages/inbox.page'
|
|||
import { HomePage } from '../pages/index.page'
|
||||
import { ProfileSecurityPage } from '../pages/profile/profileSecurity.page'
|
||||
import { ProfileSettingsPage } from '../pages/profile/profileSettings.page'
|
||||
//TODO: ProfileSubscriptionsPage - garbage code?
|
||||
import { ProfileSubscriptionsPage } from '../pages/profile/profileSubscriptions.page'
|
||||
import { SearchPage } from '../pages/search.page'
|
||||
import { TopicPage } from '../pages/topic.page'
|
||||
import { ROUTES, useRouter } from '../stores/router'
|
||||
import { MODALS, hideModal, showModal } from '../stores/ui'
|
||||
|
||||
// TODO: lazy load
|
||||
// const SomePage = lazy(() => import('./Pages/SomePage'))
|
||||
import { MODALS, showModal } from '../stores/ui'
|
||||
|
||||
const pagesMap: Record<keyof typeof ROUTES, Component<PageProps>> = {
|
||||
author: AuthorPage,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { openPage } from '@nanostores/router'
|
||||
import { clsx } from 'clsx'
|
||||
import { Match, Show, Switch, createEffect, createMemo, createSignal, on } from 'solid-js'
|
||||
import { Match, Show, Switch, createEffect, createMemo, createSignal } from 'solid-js'
|
||||
|
||||
import { useFollowing } from '../../../context/following'
|
||||
import { useLocalize } from '../../../context/localize'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// biome-ignore lint/style/useNodejsImportProtocol:
|
||||
import { Buffer } from 'buffer'
|
||||
|
||||
import { clsx } from 'clsx'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import type { AuthModalSearchParams } from './types'
|
||||
|
||||
import { clsx } from 'clsx'
|
||||
import { JSX, Show, createEffect, createSignal } from 'solid-js'
|
||||
import { JSX, Show, createSignal } from 'solid-js'
|
||||
|
||||
import { useLocalize } from '../../../context/localize'
|
||||
import { useSession } from '../../../context/session'
|
||||
|
@ -31,8 +31,8 @@ export const LoginForm = () => {
|
|||
const [isSubmitting, setIsSubmitting] = createSignal(false)
|
||||
const [password, setPassword] = createSignal('')
|
||||
const [validationErrors, setValidationErrors] = createSignal<ValidationErrors>({})
|
||||
|
||||
const [isLinkSent, setIsLinkSent] = createSignal(false)
|
||||
// FIXME: use signal or remove
|
||||
const [_isLinkSent, setIsLinkSent] = createSignal(false)
|
||||
const authFormRef: { current: HTMLFormElement } = { current: null }
|
||||
const { showSnackbar } = useSnackbar()
|
||||
const { signIn } = useSession()
|
||||
|
|
|
@ -32,7 +32,8 @@ export const RegisterForm = () => {
|
|||
const { changeSearchParams } = useRouter<AuthModalSearchParams>()
|
||||
const { t } = useLocalize()
|
||||
const { signUp, isRegistered, resendVerifyEmail } = useSession()
|
||||
const [submitError, setSubmitError] = createSignal('')
|
||||
// FIXME: use submit error data or remove signal
|
||||
const [_submitError, setSubmitError] = createSignal('')
|
||||
const [fullName, setFullName] = createSignal('')
|
||||
const [password, setPassword] = createSignal('')
|
||||
const [isSubmitting, setIsSubmitting] = createSignal(false)
|
||||
|
|
|
@ -59,7 +59,8 @@ export const HeaderAuth = (props: Props) => {
|
|||
toggleEditorPanel()
|
||||
}
|
||||
|
||||
const handleSaveButtonClick = () => {
|
||||
// FIXME: remove the code if not needed here
|
||||
const _handleSaveButtonClick = () => {
|
||||
saveShout(form)
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ export const NotificationGroup = (props: NotificationGroupProps) => {
|
|||
return (
|
||||
<>
|
||||
<For each={props.notifications}>
|
||||
{(n: Group, index) => (
|
||||
{(n: Group, _index) => (
|
||||
<>
|
||||
{t(threadCaption(n.thread), { commentsCount: n.reactions.length })}{' '}
|
||||
<div
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { clsx } from 'clsx'
|
||||
import { Show, createEffect, createSignal, on } from 'solid-js'
|
||||
import { Show, createEffect, createSignal } from 'solid-js'
|
||||
|
||||
import { useFollowing } from '../../../context/following'
|
||||
import { useLocalize } from '../../../context/localize'
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import { getPagePath } from '@nanostores/router'
|
||||
import { For, Show, batch, createMemo, createSignal, onMount } from 'solid-js'
|
||||
import { For, Show, createMemo, createSignal, onMount } from 'solid-js'
|
||||
|
||||
import { useLocalize } from '../../context/localize'
|
||||
import { apiClient } from '../../graphql/client/core'
|
||||
import { Shout, Topic } from '../../graphql/schema/core.gen'
|
||||
import { router } from '../../stores/router'
|
||||
import {
|
||||
|
@ -52,8 +51,8 @@ export const HomeView = (props: Props) => {
|
|||
const { topAuthors } = useTopAuthorsStore()
|
||||
const { t } = useLocalize()
|
||||
|
||||
const [randomTopic, setRandomTopic] = createSignal<Topic>(null)
|
||||
const [randomTopicArticles, setRandomTopicArticles] = createSignal<Shout[]>([])
|
||||
const [randomTopic, _setRandomTopic] = createSignal<Topic>(null)
|
||||
const [randomTopicArticles, _setRandomTopicArticles] = createSignal<Shout[]>([])
|
||||
|
||||
onMount(async () => {
|
||||
loadTopArticles()
|
||||
|
|
|
@ -127,10 +127,10 @@ export const PublishSettings = (props: Props) => {
|
|||
}
|
||||
const handlePublishSubmit = () => {
|
||||
const shoutData = { ...props.form, ...settingsForm }
|
||||
if (!shoutData?.mainTopic) {
|
||||
showSnackbar({ body: t('Please, set the main topic first') })
|
||||
} else {
|
||||
if (shoutData?.mainTopic) {
|
||||
publishShout(shoutData)
|
||||
} else {
|
||||
showSnackbar({ body: t('Please, set the main topic first') })
|
||||
}
|
||||
}
|
||||
const handleSaveDraft = () => {
|
||||
|
|
|
@ -10,7 +10,6 @@ import { useAuthorsStore } from '../../../stores/zine/authors'
|
|||
import { AuthorBadge } from '../../Author/AuthorBadge'
|
||||
import { Button } from '../Button'
|
||||
import { DropdownSelect } from '../DropdownSelect'
|
||||
import { Loading } from '../Loading'
|
||||
|
||||
import { InlineLoader } from '../../InlineLoader'
|
||||
import styles from './InviteMembers.module.scss'
|
||||
|
|
|
@ -57,11 +57,11 @@ export const ImageSwiper = (props: Props) => {
|
|||
const { register } = await import('swiper/element/bundle')
|
||||
register()
|
||||
SwiperCore.use([Pagination, Navigation, Manipulation, HashNavigation])
|
||||
while (!mainSwipeRef.current || !mainSwipeRef.current.swiper) {
|
||||
while (!mainSwipeRef.current?.swiper) {
|
||||
await new Promise((resolve) => setTimeout(resolve, 10)) // wait 10 ms
|
||||
}
|
||||
mainSwipeRef.current.swiper.on('slideChange', handleSlideChange)
|
||||
const initialSlide = parseInt(searchParams().slide) - 1
|
||||
const initialSlide = Number.parseInt(searchParams().slide) - 1
|
||||
if (initialSlide && !Number.isNaN(initialSlide) && initialSlide < props.images.length) {
|
||||
mainSwipeRef.current.swiper.slideTo(initialSlide, 0)
|
||||
} else {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Accessor, JSX, createContext, createEffect, createMemo, createSignal, useContext } from 'solid-js'
|
||||
import { Accessor, JSX, createContext, createEffect, createSignal, useContext } from 'solid-js'
|
||||
import { createStore } from 'solid-js/store'
|
||||
|
||||
import { apiClient } from '../graphql/client/core'
|
||||
|
@ -16,7 +16,7 @@ type SubscribeAction = { slug: string; type: 'subscribe' | 'unsubscribe' }
|
|||
|
||||
interface FollowingContextType {
|
||||
loading: Accessor<boolean>
|
||||
followers: Accessor<Array<Author>>
|
||||
followers: Accessor<Author[]>
|
||||
subscriptions: AuthorFollowsResult
|
||||
setSubscriptions: (subscriptions: AuthorFollowsResult) => void
|
||||
setFollowing: (what: FollowingEntity, slug: string, value: boolean) => void
|
||||
|
@ -41,7 +41,7 @@ const EMPTY_SUBSCRIPTIONS: AuthorFollowsResult = {
|
|||
|
||||
export const FollowingProvider = (props: { children: JSX.Element }) => {
|
||||
const [loading, setLoading] = createSignal<boolean>(false)
|
||||
const [followers, setFollowers] = createSignal<Array<Author>>([])
|
||||
const [followers, setFollowers] = createSignal<Author[]>([])
|
||||
const [subscriptions, setSubscriptions] = createStore<AuthorFollowsResult>(EMPTY_SUBSCRIPTIONS)
|
||||
const { author, session } = useSession()
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@ export type SessionContextType = {
|
|||
resendVerifyEmail: (params: ResendVerifyEmailInput) => Promise<GenericResponse>
|
||||
}
|
||||
|
||||
// biome-ignore lint/suspicious/noEmptyBlockStatements: <explanation>
|
||||
const noop = () => {}
|
||||
|
||||
const SessionContext = createContext<SessionContextType>()
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import { createGraphQLClient } from '../createGraphQLClient'
|
||||
import markSeenMutation from '../mutation/notifier/mark-seen'
|
||||
import markSeenAfterMutation from '../mutation/notifier/mark-seen-after'
|
||||
import markThreadSeenMutation from '../mutation/notifier/mark-seen-thread'
|
||||
|
|
|
@ -69,7 +69,8 @@ const checkOpenOnClient = (link: HTMLAnchorElement, event) => {
|
|||
)
|
||||
}
|
||||
|
||||
const scrollToHash = (hash: string) => {
|
||||
// TODO: use scrollToHash or remove
|
||||
const _scrollToHash = (hash: string) => {
|
||||
let selector = hash
|
||||
|
||||
if (/^#\d+/.test(selector)) {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { createLazyMemo } from '@solid-primitives/memo'
|
||||
import { createEffect, createSignal } from 'solid-js'
|
||||
import { createSignal } from 'solid-js'
|
||||
|
||||
import { apiClient } from '../../graphql/client/core'
|
||||
import { Author, QueryLoad_Authors_ByArgs } from '../../graphql/schema/core.gen'
|
||||
|
||||
export type AuthorsSortBy = 'shouts' | 'name' | 'followers'
|
||||
type SortedAuthorsSetter = (prev: Author[]) => Author[]
|
||||
|
||||
const [sortAllBy, setSortAllBy] = createSignal<AuthorsSortBy>('name')
|
||||
// FIXME: use signal or remove
|
||||
const [_sortAllBy, setSortAllBy] = createSignal<AuthorsSortBy>('name')
|
||||
|
||||
export const setAuthorsSort = (sortBy: AuthorsSortBy) => setSortAllBy(sortBy)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user