Merge branch 'main-page-hotfix' into 'dev'
main page hotfix See merge request discoursio/discoursio-webapp!32
This commit is contained in:
commit
79870a4b99
|
@ -7,6 +7,7 @@ import { loadShouts, resetSortedArticles } from '../stores/zine/articles'
|
|||
import { loadRandomTopics } from '../stores/zine/topics'
|
||||
import { Loading } from '../components/_shared/Loading'
|
||||
import { useLocalize } from '../context/localize'
|
||||
import { ReactionsProvider } from '../context/reactions'
|
||||
|
||||
export const HomePage = (props: PageProps) => {
|
||||
const [isLoaded, setIsLoaded] = createSignal(Boolean(props.homeShouts) && Boolean(props.randomTopics))
|
||||
|
@ -27,10 +28,12 @@ export const HomePage = (props: PageProps) => {
|
|||
|
||||
return (
|
||||
<PageLayout withPadding={true}>
|
||||
<Title>{t('Discours')}</Title>
|
||||
<Show when={isLoaded()} fallback={<Loading />}>
|
||||
<HomeView randomTopics={props.randomTopics} shouts={props.homeShouts || []} />
|
||||
</Show>
|
||||
<ReactionsProvider>
|
||||
<Title>{t('Discours')}</Title>
|
||||
<Show when={isLoaded()} fallback={<Loading />}>
|
||||
<HomeView randomTopics={props.randomTopics} shouts={props.homeShouts || []} />
|
||||
</Show>
|
||||
</ReactionsProvider>
|
||||
</PageLayout>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import { createMemo, createSignal, onCleanup, onMount, Show } from 'solid-js'
|
|||
import { useRouter } from '../stores/router'
|
||||
import { loadShouts, resetSortedArticles } from '../stores/zine/articles'
|
||||
import { Loading } from '../components/_shared/Loading'
|
||||
import { ReactionsProvider } from '../context/reactions'
|
||||
|
||||
export const SearchPage = (props: PageProps) => {
|
||||
const [isLoaded, setIsLoaded] = createSignal(Boolean(props.searchResults))
|
||||
|
@ -34,9 +35,11 @@ export const SearchPage = (props: PageProps) => {
|
|||
|
||||
return (
|
||||
<PageLayout>
|
||||
<Show when={isLoaded()} fallback={<Loading />}>
|
||||
<SearchView results={props.searchResults || []} query={props.searchQuery} />
|
||||
</Show>
|
||||
<ReactionsProvider>
|
||||
<Show when={isLoaded()} fallback={<Loading />}>
|
||||
<SearchView results={props.searchResults || []} query={props.searchQuery} />
|
||||
</Show>
|
||||
</ReactionsProvider>
|
||||
</PageLayout>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import { loadShouts, resetSortedArticles } from '../stores/zine/articles'
|
|||
import { useRouter } from '../stores/router'
|
||||
import { loadTopic } from '../stores/zine/topics'
|
||||
import { Loading } from '../components/_shared/Loading'
|
||||
import { ReactionsProvider } from '../context/reactions'
|
||||
|
||||
export const TopicPage = (props: PageProps) => {
|
||||
const [isLoaded, setIsLoaded] = createSignal(Boolean(props.topicShouts) && Boolean(props.topic))
|
||||
|
@ -37,9 +38,11 @@ export const TopicPage = (props: PageProps) => {
|
|||
|
||||
return (
|
||||
<PageLayout>
|
||||
<Show when={isLoaded()} fallback={<Loading />}>
|
||||
<TopicView topic={props.topic} shouts={props.topicShouts} topicSlug={slug()} />
|
||||
</Show>
|
||||
<ReactionsProvider>
|
||||
<Show when={isLoaded()} fallback={<Loading />}>
|
||||
<TopicView topic={props.topic} shouts={props.topicShouts} topicSlug={slug()} />
|
||||
</Show>
|
||||
</ReactionsProvider>
|
||||
</PageLayout>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user