refactor(i18n): consolidate Lang type imports to types/i18n

Move all Lang type imports from various locations to a centralized location in types/i18n for better maintainability and consistency
This commit is contained in:
joyzhao
2025-06-21 09:36:32 +08:00
parent 67f713565a
commit a8c3d4b197
7 changed files with 7 additions and 7 deletions

View File

@@ -22,7 +22,6 @@ const allSkills: SkillItem[] = [
{ name: "Node.js", icon: "nodejs" }, { name: "Node.js", icon: "nodejs" },
{ name: "Express.js", icon: "express" }, { name: "Express.js", icon: "express" },
{ name: "Nest.js", icon: "nestjs" }, { name: "Nest.js", icon: "nestjs" },
// { name: "Fastify.js", icon: "fastify" },
{ name: "Hono.js", icon: "nodejs" }, // Using nodejs icon as fallback { name: "Hono.js", icon: "nodejs" }, // Using nodejs icon as fallback
// Database & Storage // Database & Storage

View File

@@ -1,5 +1,6 @@
--- ---
import { type BlogPost, type Lang } from '@/types'; import { type BlogPost } from '@/types';
import { type Lang } from '@/types/i18n';
import { getBlogBaseUrl, filterPostsByCategory, filterPostsByTag, sortPostsByDate } from '@/utils/blog-utils'; import { getBlogBaseUrl, filterPostsByCategory, filterPostsByTag, sortPostsByDate } from '@/utils/blog-utils';
interface Props { interface Props {

View File

@@ -1,6 +1,6 @@
--- ---
import { Tag } from 'lucide-react'; import { Tag } from 'lucide-react';
import { type Lang } from '@/i18n/utils'; import { type Lang } from '@/types/i18n';
import { defaultLang } from '@/i18n/ui'; import { defaultLang } from '@/i18n/ui';
import { getBlogBaseUrl, extractCategories } from '@/utils/blog-utils'; import { getBlogBaseUrl, extractCategories } from '@/utils/blog-utils';

View File

@@ -1,5 +1,5 @@
--- ---
import { type Lang } from '@/i18n/utils'; import { type Lang } from '@/types/i18n';
import { useTranslations } from '@/i18n/utils'; import { useTranslations } from '@/i18n/utils';
export interface Props { export interface Props {

View File

@@ -1,6 +1,6 @@
--- ---
import { Hash } from 'lucide-react'; import { Hash } from 'lucide-react';
import { type Lang } from '@/i18n/utils'; import { type Lang } from '@/types/i18n';
import { defaultLang } from '@/i18n/ui'; import { defaultLang } from '@/i18n/ui';
import { getBlogBaseUrl, extractTags } from '@/utils/blog-utils'; import { getBlogBaseUrl, extractTags } from '@/utils/blog-utils';

View File

@@ -1,6 +1,6 @@
--- ---
import { type BlogPost as BaseBlogPost } from '@/types'; import { type BlogPost as BaseBlogPost } from '@/types';
import { type Lang } from '@/i18n/utils'; import { type Lang } from '@/types/i18n';
// Get current path and language information // Get current path and language information
const currentPath = Astro.url.pathname; const currentPath = Astro.url.pathname;

View File

@@ -1,5 +1,5 @@
--- ---
import { type Lang } from '@/types'; import { type Lang } from '@/types/i18n';
import { ScrollArea } from '@/components/ui/scroll-area'; import { ScrollArea } from '@/components/ui/scroll-area';
interface Props { interface Props {