refactor(data): move data exports to index file

Consolidate data exports from data.ts to index.ts for better organization and maintainability. Remove the now redundant data.ts file.
This commit is contained in:
joyzhao
2025-06-21 10:17:27 +08:00
parent 6d80b12855
commit d0fe30a5e3
8 changed files with 11 additions and 51 deletions

View File

@@ -8,7 +8,7 @@ import Container from "@/components/ui/Container";
import { useTranslations } from "@/i18n/utils";
import type { Lang } from "@/types/i18n";
import { defaultLang } from "@/i18n/ui";
import { personalInfo, services } from "@/lib/data";
import { personalInfo, services } from "@/lib/data/index";
// 使用Astro.currentLocale获取当前语言环境
const lang = Astro.currentLocale as Lang || defaultLang;

View File

@@ -3,9 +3,10 @@ import Layout from "@/layouts/Layout.astro";
import GlassHeader from "@/components/GlassHeader";
import Footer from "@/components/Footer";
import Container from "@/components/ui/Container";
import { useTranslations, type Lang } from "@/i18n/utils";
import { useTranslations } from "@/i18n/utils";
import type { Lang } from "@/types/i18n";
import { defaultLang } from "@/i18n/ui";
import { projects } from "@/lib/data";
import { projects } from "@/lib/data/index";
// 使用Astro.currentLocale获取当前语言环境
const lang = Astro.currentLocale as Lang || defaultLang;

View File

@@ -8,7 +8,7 @@ import Container from "@/components/ui/Container";
import { useTranslations } from "@/i18n/utils";
import type { Lang } from "@/types/i18n";
import { defaultLang } from "@/i18n/ui";
import { personalInfo, services } from "@/lib/data";
import { personalInfo, services } from "@/lib/data/index";
// 使用Astro.currentLocale获取当前语言环境
const lang = Astro.currentLocale as Lang || defaultLang;

View File

@@ -3,9 +3,10 @@ import Layout from "@/layouts/Layout.astro";
import GlassHeader from "@/components/GlassHeader";
import Footer from "@/components/Footer";
import Container from "@/components/ui/Container";
import { useTranslations, type Lang } from "@/i18n/utils";
import { useTranslations } from "@/i18n/utils";
import type { Lang } from "@/types/i18n";
import { defaultLang } from "@/i18n/ui";
import { projects } from "@/lib/data";
import { projects } from "@/lib/data/index";
// 使用Astro.currentLocale获取当前语言环境
const lang = Astro.currentLocale as Lang || defaultLang;