Skip to content

Commit

Permalink
Update Next.js configuration, remove unused page component, and adjus…
Browse files Browse the repository at this point in the history
…t secretary service API path
  • Loading branch information
SkywalkerJi committed Dec 26, 2024
1 parent cb78a9e commit cd7bbab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 312 deletions.
310 changes: 0 additions & 310 deletions app/page.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
basePath: "/kc-development-tools",
basePath: '/kc-development-tools',
images: {
unoptimized: true,
},
Expand Down
3 changes: 2 additions & 1 deletion utils/secretaryService.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { SecretaryData } from '@/types/secretary';

const STORAGE_KEY = 'secretary_bonus_data';
const BASE_PATH = '/kc-development-tools';

// 从 localStorage 获取数据
export function getSecretaryData(): SecretaryData[] {
Expand Down Expand Up @@ -60,7 +61,7 @@ export async function initializeData() {
const existingData = localStorage.getItem(STORAGE_KEY);
if (!existingData) {
try {
const response = await fetch('/data/secretary_bonus.json');
const response = await fetch(`${BASE_PATH}/data/secretary_bonus.json`);
const initialData = await response.json();
saveSecretaryData(initialData);
} catch (error) {
Expand Down

0 comments on commit cd7bbab

Please sign in to comment.