refactor(types): centralize type definitions in shared types file
Move all interface and type definitions to src/types/index.ts to reduce code duplication and improve maintainability. This includes types for components, blog posts, personal info, and localization.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
---
|
||||
import { type BlogPost as BaseBlogPost } from '@/types';
|
||||
|
||||
const currentPath = Astro.url.pathname;
|
||||
const isZh = currentPath.includes('/zh/');
|
||||
const lang = isZh ? 'zh' : 'en';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
import type { Lang } from '../../i18n/utils';
|
||||
import { type Lang } from '@/types';
|
||||
|
||||
interface Props {
|
||||
lang: Lang;
|
||||
|
||||
Reference in New Issue
Block a user