styles+error-new-fix
This commit is contained in:
parent
0c000b8b6e
commit
878f0036ab
|
@ -1,5 +1,4 @@
|
||||||
.allAuthorsPage {
|
.group {
|
||||||
.group {
|
|
||||||
@include font-size(1.6rem);
|
@include font-size(1.6rem);
|
||||||
|
|
||||||
margin: 3em 0 9.6rem;
|
margin: 3em 0 9.6rem;
|
||||||
|
@ -20,7 +19,7 @@
|
||||||
.topic {
|
.topic {
|
||||||
margin-bottom: 2.4rem;
|
margin-bottom: 2.4rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
width: auto;
|
width: auto;
|
||||||
|
@ -30,7 +29,6 @@
|
||||||
width: 100px !important;
|
width: 100px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.loadMoreContainer {
|
.loadMoreContainer {
|
||||||
margin-top: 48px;
|
margin-top: 48px;
|
||||||
|
|
|
@ -90,13 +90,13 @@ export const AllTopics = (props: Props) => {
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
const AllTopicAlphabeticallyHead = () => (
|
const AllTopicAlphabeticallyHead = () => (
|
||||||
<div class="col-lg-18 col-xl-15">
|
<div class="col-lg-20 col-xl-18">
|
||||||
<ul class={clsx('nodash', styles.alphabet)}>
|
<ul class={clsx('nodash', styles.alphabet)}>
|
||||||
<For each={Array.from(alphabet())}>
|
<For each={[...alphabet()]}>
|
||||||
{(letter, index) => (
|
{(letter, index) => (
|
||||||
<li>
|
<li>
|
||||||
<Show when={letter in byLetter()} fallback={letter}>
|
<Show when={letter in byLetter()} fallback={letter}>
|
||||||
<A
|
<a
|
||||||
href={`/topic?by=title#letter-${index()}`}
|
href={`/topic?by=title#letter-${index()}`}
|
||||||
onClick={(event) => {
|
onClick={(event) => {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
@ -104,7 +104,7 @@ export const AllTopics = (props: Props) => {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{letter}
|
{letter}
|
||||||
</A>
|
</a>
|
||||||
</Show>
|
</Show>
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -73,7 +73,7 @@ export const ConnectProvider = (props: { children: JSX.Element }) => {
|
||||||
setConnected(false)
|
setConnected(false)
|
||||||
if (retried() < RECONNECT_TIMES) {
|
if (retried() < RECONNECT_TIMES) {
|
||||||
setRetried((r) => r + 1)
|
setRetried((r) => r + 1)
|
||||||
} else throw Error('failed')
|
} else throw new Error('failed')
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('[context.connect] SSE init failed:', error)
|
console.error('[context.connect] SSE init failed:', error)
|
||||||
|
|
|
@ -105,7 +105,7 @@ export const ReactionsProvider = (props: { children: JSX.Element }) => {
|
||||||
const updateReaction = async (input: MutationUpdate_ReactionArgs): Promise<Reaction> => {
|
const updateReaction = async (input: MutationUpdate_ReactionArgs): Promise<Reaction> => {
|
||||||
const resp = await mutation(updateReactionMutation, input).toPromise()
|
const resp = await mutation(updateReactionMutation, input).toPromise()
|
||||||
const result = resp?.data?.update_reaction
|
const result = resp?.data?.update_reaction
|
||||||
if (!result) throw Error('cannot update reaction')
|
if (!result) throw new Error('cannot update reaction')
|
||||||
const { error, reaction } = result
|
const { error, reaction } = result
|
||||||
if (error) await showSnackbar({ type: 'error', body: t(error) })
|
if (error) await showSnackbar({ type: 'error', body: t(error) })
|
||||||
if (reaction) setReactionEntities(reaction.id, reaction)
|
if (reaction) setReactionEntities(reaction.id, reaction)
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { RouteDefinition, RouteLoadFuncArgs, type RouteSectionProps, createAsync
|
||||||
import { Suspense, createEffect, on } from 'solid-js'
|
import { Suspense, createEffect, on } from 'solid-js'
|
||||||
import { AllAuthors } from '~/components/Views/AllAuthors'
|
import { AllAuthors } from '~/components/Views/AllAuthors'
|
||||||
import { AUTHORS_PER_PAGE } from '~/components/Views/AllAuthors/AllAuthors'
|
import { AUTHORS_PER_PAGE } from '~/components/Views/AllAuthors/AllAuthors'
|
||||||
import styles from '~/components/Views/AllAuthors/AllAuthors.module.scss'
|
|
||||||
import { Loading } from '~/components/_shared/Loading'
|
import { Loading } from '~/components/_shared/Loading'
|
||||||
import { PageLayout } from '~/components/_shared/PageLayout'
|
import { PageLayout } from '~/components/_shared/PageLayout'
|
||||||
import { useAuthors } from '~/context/authors'
|
import { useAuthors } from '~/context/authors'
|
||||||
|
@ -72,7 +71,6 @@ export default function AllAuthorsPage(props: RouteSectionProps<AllAuthorsData>)
|
||||||
<PageLayout
|
<PageLayout
|
||||||
withPadding={true}
|
withPadding={true}
|
||||||
title={`${t('Discours')} :: ${t('All authors')}`}
|
title={`${t('Discours')} :: ${t('All authors')}`}
|
||||||
class={styles.allAuthorsPage}
|
|
||||||
desc="List of authors of the open editorial community"
|
desc="List of authors of the open editorial community"
|
||||||
>
|
>
|
||||||
<ReactionsProvider>
|
<ReactionsProvider>
|
||||||
|
|
|
@ -20,7 +20,7 @@ export default () => {
|
||||||
const result = await client.query(getShoutDraft, { shout_id: params.id }).toPromise()
|
const result = await client.query(getShoutDraft, { shout_id: params.id }).toPromise()
|
||||||
if (result) {
|
if (result) {
|
||||||
const { shout: loadedShout, error } = result.data.get_my_shout
|
const { shout: loadedShout, error } = result.data.get_my_shout
|
||||||
if (error) throw Error(error)
|
if (error) throw new Error(error)
|
||||||
setShout(loadedShout)
|
setShout(loadedShout)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user