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:
joyzhao
2025-06-19 11:26:47 +08:00
parent acd0fa4bb9
commit 25281f4459
15 changed files with 180 additions and 91 deletions

View File

@@ -3,10 +3,7 @@ import { personalInfo } from "@/lib/data";
import { motion } from "framer-motion";
import { useState, useEffect } from "react";
import { defaultLang } from "@/i18n/ui";
interface FooterProps {
lang?: Lang;
}
import { type FooterProps } from "@/types";
export default function Footer({ lang: propLang }: FooterProps) {
// 优先使用props传入的语言如果没有则尝试从HTML lang属性获取