refactor(i18n): update personal info and improve language switcher

- Update personal information in i18n files to reflect new user details
- Remove hardcoded personal info from GlassHeader and use i18n instead
- Simplify navigation items in GlassHeader by removing unused sections
- Enhance LanguageSwitcher UI with better display and chevron icon
This commit is contained in:
joyzhao
2025-06-15 17:33:17 +08:00
parent 1476f4eeec
commit 12631de53e
3 changed files with 14 additions and 14 deletions

View File

@@ -1,7 +1,6 @@
import ThemeToggle from "./ui/theme-toggle";
import LanguageSwitcher from "./LanguageSwitcher";
import { useTranslations, getLocalizedPath, type Lang } from "@/i18n/utils";
import { personalInfo } from "@/lib/data";
import { useState } from "react";
import { Menu, X } from "lucide-react";
import { motion, AnimatePresence } from "framer-motion";
@@ -25,7 +24,7 @@ export default function GlassHeader({ lang }: GlassHeaderProps) {
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
>
{personalInfo.name}
{t('personal.name')}
</motion.a>
{/* Desktop Navigation */}
@@ -34,8 +33,6 @@ export default function GlassHeader({ lang }: GlassHeaderProps) {
{ key: 'nav.experience', icon: '💼 ', sectionId: 'experience' },
{ key: 'nav.skills', icon: '🛠️ ', sectionId: 'skills' },
{ key: 'nav.projects', icon: '🚀 ', sectionId: 'projects' },
{ key: 'nav.awards', icon: '🏆 ', sectionId: 'awards' },
{ key: 'nav.education', icon: '🎓 ', sectionId: 'education' },
].map(
(item, index) => (
<motion.a