mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 03:32:51 +02:00
🚀 refactor: optimize i18n logic functions and function naming
This commit is contained in:
parent
74a2b9da1a
commit
1492ae07d2
7 changed files with 118 additions and 174 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue