styles+error-new-fix

This commit is contained in:
Untone 2024-07-09 13:35:57 +03:00
parent 0c000b8b6e
commit 878f0036ab
6 changed files with 24 additions and 28 deletions

View File

@ -1,27 +1,26 @@
.allAuthorsPage {
.group {
@include font-size(1.6rem);
.group {
@include font-size(1.6rem);
margin: 3em 0 9.6rem;
margin: 3em 0 9.6rem;
@include media-breakpoint-down(sm) {
margin-bottom: 6.4rem;
}
h2 {
margin-bottom: 3.2rem;
text-transform: capitalize;
@include media-breakpoint-down(sm) {
margin-bottom: 6.4rem;
}
h2 {
margin-bottom: 3.2rem;
text-transform: capitalize;
@include media-breakpoint-down(sm) {
margin-bottom: 1.6rem;
}
}
.topic {
margin-bottom: 2.4rem;
margin-bottom: 1.6rem;
}
}
.topic {
margin-bottom: 2.4rem;
}
}
.container {
width: auto;
@ -30,7 +29,6 @@
width: 100px !important;
}
}
}
.loadMoreContainer {
margin-top: 48px;

View File

@ -90,13 +90,13 @@ export const AllTopics = (props: Props) => {
</div>
)
const AllTopicAlphabeticallyHead = () => (
<div class="col-lg-18 col-xl-15">
<div class="col-lg-20 col-xl-18">
<ul class={clsx('nodash', styles.alphabet)}>
<For each={Array.from(alphabet())}>
<For each={[...alphabet()]}>
{(letter, index) => (
<li>
<Show when={letter in byLetter()} fallback={letter}>
<A
<a
href={`/topic?by=title#letter-${index()}`}
onClick={(event) => {
event.preventDefault()
@ -104,7 +104,7 @@ export const AllTopics = (props: Props) => {
}}
>
{letter}
</A>
</a>
</Show>
</li>
)}

View File

@ -73,7 +73,7 @@ export const ConnectProvider = (props: { children: JSX.Element }) => {
setConnected(false)
if (retried() < RECONNECT_TIMES) {
setRetried((r) => r + 1)
} else throw Error('failed')
} else throw new Error('failed')
}
} catch (error) {
console.error('[context.connect] SSE init failed:', error)

View File

@ -105,7 +105,7 @@ export const ReactionsProvider = (props: { children: JSX.Element }) => {
const updateReaction = async (input: MutationUpdate_ReactionArgs): Promise<Reaction> => {
const resp = await mutation(updateReactionMutation, input).toPromise()
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
if (error) await showSnackbar({ type: 'error', body: t(error) })
if (reaction) setReactionEntities(reaction.id, reaction)

View File

@ -2,7 +2,6 @@ import { RouteDefinition, RouteLoadFuncArgs, type RouteSectionProps, createAsync
import { Suspense, createEffect, on } from 'solid-js'
import { AllAuthors } from '~/components/Views/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 { PageLayout } from '~/components/_shared/PageLayout'
import { useAuthors } from '~/context/authors'
@ -72,7 +71,6 @@ export default function AllAuthorsPage(props: RouteSectionProps<AllAuthorsData>)
<PageLayout
withPadding={true}
title={`${t('Discours')} :: ${t('All authors')}`}
class={styles.allAuthorsPage}
desc="List of authors of the open editorial community"
>
<ReactionsProvider>

View File

@ -20,7 +20,7 @@ export default () => {
const result = await client.query(getShoutDraft, { shout_id: params.id }).toPromise()
if (result) {
const { shout: loadedShout, error } = result.data.get_my_shout
if (error) throw Error(error)
if (error) throw new Error(error)
setShout(loadedShout)
}
}