biome-fixes
This commit is contained in:
parent
c68001fcc1
commit
4218de6fba
|
@ -27,6 +27,7 @@
|
|||
"useOptionalChain": "warn"
|
||||
},
|
||||
"a11y": {
|
||||
"useHeadingContent": "off",
|
||||
"useKeyWithClickEvents": "off",
|
||||
"useKeyWithMouseEvents": "off",
|
||||
"useAnchorContent": "off",
|
||||
|
|
|
@ -165,7 +165,9 @@ export const AuthorCard = (props: Props) => {
|
|||
class={styles.subscribersItem}
|
||||
/>
|
||||
)
|
||||
} else if ('title' in f) {
|
||||
}
|
||||
|
||||
if ('title' in f) {
|
||||
return (
|
||||
<Userpic
|
||||
size={'XS'}
|
||||
|
@ -175,6 +177,7 @@ export const AuthorCard = (props: Props) => {
|
|||
/>
|
||||
)
|
||||
}
|
||||
|
||||
return null
|
||||
}}
|
||||
</For>
|
||||
|
@ -196,7 +199,7 @@ export const AuthorCard = (props: Props) => {
|
|||
class={styles.socialLink}
|
||||
href={link.startsWith('http') ? link : `https://${link}`}
|
||||
target="_blank"
|
||||
rel="nofollow noopener"
|
||||
rel="nofollow noopener noreferrer"
|
||||
>
|
||||
<span class={styles.authorSubscribeSocialLabel}>
|
||||
{link.startsWith('http') ? link : `https://${link}`}
|
||||
|
|
|
@ -16,7 +16,7 @@ export const ArticlePage = (props: PageProps) => {
|
|||
const shouts = props.article ? [props.article] : []
|
||||
const { page } = useRouter()
|
||||
|
||||
const slug = createMemo(() => page().params['slug'] as string)
|
||||
const slug = createMemo(() => page().params.slug as string)
|
||||
|
||||
const { articleEntities } = useArticlesStore({
|
||||
shouts,
|
||||
|
|
|
@ -14,7 +14,7 @@ import { loadAuthor } from '../stores/zine/authors'
|
|||
export const AuthorPage = (props: PageProps) => {
|
||||
const { t } = useLocalize()
|
||||
const { page } = useRouter()
|
||||
const slug = createMemo(() => page().params['slug'] as string)
|
||||
const slug = createMemo(() => page().params.slug as string)
|
||||
|
||||
const [isLoaded, setIsLoaded] = createSignal(
|
||||
Boolean(props.authorShouts) && Boolean(props.author) && props.author.slug === slug(),
|
||||
|
|
|
@ -12,7 +12,7 @@ import { LayoutType } from '../types'
|
|||
export const ExpoPage = (props: PageProps) => {
|
||||
const { t } = useLocalize()
|
||||
const { page } = useRouter()
|
||||
const getLayout = createMemo<LayoutType>(() => page().params['layout'] as LayoutType)
|
||||
const getLayout = createMemo<LayoutType>(() => page().params.layout as LayoutType)
|
||||
|
||||
const getTitle = () => {
|
||||
switch (getLayout()) {
|
||||
|
|
|
@ -14,11 +14,11 @@ export const SearchPage = (props: PageProps) => {
|
|||
const [isLoaded, setIsLoaded] = createSignal(Boolean(props.searchResults))
|
||||
const { t } = useLocalize()
|
||||
const { page } = useRouter()
|
||||
const q = createMemo(() => page().params['q'] as string)
|
||||
const q = createMemo(() => page().params.q as string)
|
||||
|
||||
createEffect(async () => {
|
||||
if (isLoaded()) return
|
||||
else if (q() && window) {
|
||||
if (q() && window) {
|
||||
const text = q() || window.location.href.split('/').pop()
|
||||
// TODO: pagination, load more
|
||||
await loadShoutsSearch({ text, limit: 50, offset: 0 })
|
||||
|
|
|
@ -12,7 +12,7 @@ import { loadTopic } from '../stores/zine/topics'
|
|||
|
||||
export const TopicPage = (props: PageProps) => {
|
||||
const { page } = useRouter()
|
||||
const slug = createMemo(() => page().params['slug'] as string)
|
||||
const slug = createMemo(() => page().params.slug as string)
|
||||
|
||||
const [isLoaded, setIsLoaded] = createSignal(
|
||||
Boolean(props.topicShouts) && Boolean(props.topic) && props.topic.slug === slug(),
|
||||
|
|
Loading…
Reference in New Issue
Block a user