biome-fixes
This commit is contained in:
parent
c68001fcc1
commit
4218de6fba
|
@ -27,6 +27,7 @@
|
||||||
"useOptionalChain": "warn"
|
"useOptionalChain": "warn"
|
||||||
},
|
},
|
||||||
"a11y": {
|
"a11y": {
|
||||||
|
"useHeadingContent": "off",
|
||||||
"useKeyWithClickEvents": "off",
|
"useKeyWithClickEvents": "off",
|
||||||
"useKeyWithMouseEvents": "off",
|
"useKeyWithMouseEvents": "off",
|
||||||
"useAnchorContent": "off",
|
"useAnchorContent": "off",
|
||||||
|
|
|
@ -165,7 +165,9 @@ export const AuthorCard = (props: Props) => {
|
||||||
class={styles.subscribersItem}
|
class={styles.subscribersItem}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
} else if ('title' in f) {
|
}
|
||||||
|
|
||||||
|
if ('title' in f) {
|
||||||
return (
|
return (
|
||||||
<Userpic
|
<Userpic
|
||||||
size={'XS'}
|
size={'XS'}
|
||||||
|
@ -175,6 +177,7 @@ export const AuthorCard = (props: Props) => {
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return null
|
return null
|
||||||
}}
|
}}
|
||||||
</For>
|
</For>
|
||||||
|
@ -196,7 +199,7 @@ export const AuthorCard = (props: Props) => {
|
||||||
class={styles.socialLink}
|
class={styles.socialLink}
|
||||||
href={link.startsWith('http') ? link : `https://${link}`}
|
href={link.startsWith('http') ? link : `https://${link}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="nofollow noopener"
|
rel="nofollow noopener noreferrer"
|
||||||
>
|
>
|
||||||
<span class={styles.authorSubscribeSocialLabel}>
|
<span class={styles.authorSubscribeSocialLabel}>
|
||||||
{link.startsWith('http') ? link : `https://${link}`}
|
{link.startsWith('http') ? link : `https://${link}`}
|
||||||
|
|
|
@ -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'] as string)
|
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,11 +14,11 @@ 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
|
||||||
else if (q() && window) {
|
if (q() && window) {
|
||||||
const text = q() || window.location.href.split('/').pop()
|
const text = q() || window.location.href.split('/').pop()
|
||||||
// TODO: pagination, load more
|
// TODO: pagination, load more
|
||||||
await loadShoutsSearch({ text, limit: 50, offset: 0 })
|
await loadShoutsSearch({ text, limit: 50, offset: 0 })
|
||||||
|
|
|
@ -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