refactor: rename functions

This commit is contained in:
radishzzz 2025-03-14 14:23:35 +00:00
parent ca1abd28c1
commit f5526f8622
17 changed files with 46 additions and 49 deletions

View file

@ -10,8 +10,7 @@ interface Props {
const { date, updatedDate, minutes } = Astro.props
const format = themeConfig.global.dateFormat
const currentPath = Astro.url.pathname
const isPost = isPostPage(currentPath)
const isPost = isPostPage(Astro.url.pathname)
const timeSpacingClass = isPost ? 'ml-1.75' : 'ml-1.5'
function formatDate(date: Date, format: 'YYYY-MM-DD' | 'MM-DD-YYYY' | 'DD-MM-YYYY' | 'MONTH DAY YYYY' | 'DAY MONTH YYYY') {