📝 priettier check
All checks were successful
PR Checks / lint-and-build (pull_request) Successful in 18s

This commit is contained in:
RJ
2025-12-04 15:57:39 +02:00
parent b68325123b
commit 101624c4d5
32 changed files with 185 additions and 172 deletions

View File

@@ -62,9 +62,7 @@ export function OptimizedImage({
return (
<span className={`block my-8 ${className}`}>
{imageElement}
{caption && (
<span className="block mt-3 text-center text-sm text-zinc-400">{caption}</span>
)}
{caption && <span className="block mt-3 text-center text-sm text-zinc-400">{caption}</span>}
</span>
)
}

View File

@@ -40,7 +40,7 @@ export function BlogCard({ post, variant }: BlogCardProps) {
))}
</div>
<span className="inline-flex items-center font-mono text-xs uppercase text-cyan-400 hover:text-cyan-300 transition-colors">
&gt; {t('readingTime', {minutes: post.readingTime})}
&gt; {t('readingTime', { minutes: post.readingTime })}
</span>
</article>
</Link>
@@ -84,7 +84,7 @@ export function BlogCard({ post, variant }: BlogCardProps) {
))}
</div>
<span className="inline-flex items-center font-mono text-xs uppercase text-cyan-400 hover:text-cyan-300 transition-colors">
&gt; {t('readingTime', {minutes: post.readingTime})}
&gt; {t('readingTime', { minutes: post.readingTime })}
</span>
</div>
</div>
@@ -129,7 +129,7 @@ export function BlogCard({ post, variant }: BlogCardProps) {
))}
</div>
<span className="inline-flex items-center font-mono text-xs uppercase text-cyan-400 hover:text-cyan-300 transition-colors">
&gt; {t('readingTime', {minutes: post.readingTime})}
&gt; {t('readingTime', { minutes: post.readingTime })}
</span>
</div>
</article>

View File

@@ -3,7 +3,7 @@ import { getPopularTags } from '@/lib/tags'
import { TagBadge } from './tag-badge'
export async function PopularTags({ limit = 5 }: { limit?: number }) {
const tags = await getPopularTags("en", limit)
const tags = await getPopularTags('en', limit)
if (tags.length === 0) return null

View File

@@ -28,7 +28,7 @@ export function TagCloud({ tags }: TagCloudProps) {
hover:text-cyan-400
transition-colors
`}
title={t('postsWithTag', {count: tag.count, tag: tag.name})}
title={t('postsWithTag', { count: tag.count, tag: tag.name })}
>
#{tag.name}
</Link>

View File

@@ -1,6 +1,6 @@
'use client'
import {Link} from '@/i18n/navigation'
import { Link } from '@/i18n/navigation'
import { usePathname } from 'next/navigation'
import { useLocale, useTranslations } from 'next-intl'
import { Fragment } from 'react'

View File

@@ -1,21 +1,21 @@
'use client';
'use client'
import {useLocale} from 'next-intl';
import {useRouter, usePathname} from '@/i18n/navigation';
import {routing} from '@/i18n/routing';
import {useState} from 'react';
import { useLocale } from 'next-intl'
import { useRouter, usePathname } from '@/i18n/navigation'
import { routing } from '@/i18n/routing'
import { useState } from 'react'
export default function LanguageSwitcher() {
const locale = useLocale();
const router = useRouter();
const pathname = usePathname();
const [isOpen, setIsOpen] = useState(false);
const locale = useLocale()
const router = useRouter()
const pathname = usePathname()
const [isOpen, setIsOpen] = useState(false)
const handleLocaleChange = (newLocale: string) => {
router.replace(pathname, {locale: newLocale});
router.refresh();
setIsOpen(false);
};
router.replace(pathname, { locale: newLocale })
router.refresh()
setIsOpen(false)
}
return (
<div className="relative z-[100]">
@@ -36,9 +36,8 @@ export default function LanguageSwitcher() {
className={`
w-full text-left px-4 py-2 font-mono uppercase text-xs
border-b border-slate-700 last:border-b-0
${locale === loc
? 'bg-cyan-900 text-cyan-300'
: 'text-slate-400 hover:bg-slate-800'
${
locale === loc ? 'bg-cyan-900 text-cyan-300' : 'text-slate-400 hover:bg-slate-800'
}
`}
>
@@ -48,12 +47,7 @@ export default function LanguageSwitcher() {
</div>
)}
{isOpen && (
<div
className="fixed inset-0 z-40"
onClick={() => setIsOpen(false)}
/>
)}
{isOpen && <div className="fixed inset-0 z-40" onClick={() => setIsOpen(false)} />}
</div>
);
)
}