sometimes-needed
Some checks failed
Some checks failed
This commit is contained in:
parent
a3721ea504
commit
5522c565b4
|
@ -16,7 +16,7 @@ export const ArticlePage = (props: PageProps) => {
|
||||||
const shouts = props.article ? [props.article] : []
|
const shouts = props.article ? [props.article] : []
|
||||||
const { page } = useRouter()
|
const { page } = useRouter()
|
||||||
|
|
||||||
const slug = createMemo(() => page().params['slug'])
|
const slug = createMemo(() => page().params['slug'] as string)
|
||||||
|
|
||||||
const { articleEntities } = useArticlesStore({
|
const { articleEntities } = useArticlesStore({
|
||||||
shouts,
|
shouts,
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { loadAuthor } from '../stores/zine/authors'
|
||||||
export const AuthorPage = (props: PageProps) => {
|
export const AuthorPage = (props: PageProps) => {
|
||||||
const { t } = useLocalize()
|
const { t } = useLocalize()
|
||||||
const { page } = useRouter()
|
const { page } = useRouter()
|
||||||
const slug = createMemo(() => page().params.slug as string)
|
const slug = createMemo(() => page().params['slug'] as string)
|
||||||
|
|
||||||
const [isLoaded, setIsLoaded] = createSignal(
|
const [isLoaded, setIsLoaded] = createSignal(
|
||||||
Boolean(props.authorShouts) && Boolean(props.author) && props.author.slug === slug(),
|
Boolean(props.authorShouts) && Boolean(props.author) && props.author.slug === slug(),
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { LayoutType } from '../types'
|
||||||
export const ExpoPage = (props: PageProps) => {
|
export const ExpoPage = (props: PageProps) => {
|
||||||
const { t } = useLocalize()
|
const { t } = useLocalize()
|
||||||
const { page } = useRouter()
|
const { page } = useRouter()
|
||||||
const getLayout = createMemo<LayoutType>(() => page().params.layout as LayoutType)
|
const getLayout = createMemo<LayoutType>(() => page().params['layout'] as LayoutType)
|
||||||
|
|
||||||
const getTitle = () => {
|
const getTitle = () => {
|
||||||
switch (getLayout()) {
|
switch (getLayout()) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ export const SearchPage = (props: PageProps) => {
|
||||||
const [isLoaded, setIsLoaded] = createSignal(Boolean(props.searchResults))
|
const [isLoaded, setIsLoaded] = createSignal(Boolean(props.searchResults))
|
||||||
const { t } = useLocalize()
|
const { t } = useLocalize()
|
||||||
const { page } = useRouter()
|
const { page } = useRouter()
|
||||||
const q = createMemo(() => page().params.q as string)
|
const q = createMemo(() => page().params['q'] as string)
|
||||||
|
|
||||||
createEffect(async () => {
|
createEffect(async () => {
|
||||||
if (isLoaded()) return
|
if (isLoaded()) return
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { loadTopic } from '../stores/zine/topics'
|
||||||
|
|
||||||
export const TopicPage = (props: PageProps) => {
|
export const TopicPage = (props: PageProps) => {
|
||||||
const { page } = useRouter()
|
const { page } = useRouter()
|
||||||
const slug = createMemo(() => page().params.slug as string)
|
const slug = createMemo(() => page().params['slug'] as string)
|
||||||
|
|
||||||
const [isLoaded, setIsLoaded] = createSignal(
|
const [isLoaded, setIsLoaded] = createSignal(
|
||||||
Boolean(props.topicShouts) && Boolean(props.topic) && props.topic.slug === slug(),
|
Boolean(props.topicShouts) && Boolean(props.topic) && props.topic.slug === slug(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user