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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user