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