🚀 refactor: optimize i18n logic functions and function naming

This commit is contained in:
radishzzz 2025-03-16 23:54:03 +00:00
parent 74a2b9da1a
commit 1492ae07d2
7 changed files with 118 additions and 174 deletions

View file

@ -6,6 +6,7 @@ import { getLocalizedPath } from '@/i18n/path'
export function cleanPath(path: string) {
return path.replace(/^\/|\/$/g, '')
}
// Checks if the current path is the home/post/tag/about page
export function isHomePage(path: string) {
const clean = cleanPath(path)