Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/contexts/LocalizationContext.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// src/contexts/LocalizationContext.tsx
import React, { createContext, useContext, useState, useEffect, type ReactNode } from 'react';

Check warning on line 2 in src/contexts/LocalizationContext.tsx

View workflow job for this annotation

GitHub Actions / build

'useEffect' is defined but never used. Allowed unused vars must match /^_/u
import localizationData from '../localization.json';
import localizationInfo from '../localization-info.json';
import caseData1_7 from '../localization-case_1-7.json';
import caseData8_14 from '../localization-case_8-14.json';
import caseData15_21 from '../localization-case_15-21.json';
Expand All @@ -13,6 +14,7 @@
// 모든 localization 데이터 병합
const allLocalizationData = {
...localizationData,
...localizationInfo,
...caseData1_7,
...caseData8_14,
...caseData15_21,
Expand Down Expand Up @@ -54,7 +56,7 @@
console.warn(`Translation key "${key}" not found`);
return key;
}
return translation[language] || translation['KO'] || key;

Check failure on line 59 in src/contexts/LocalizationContext.tsx

View workflow job for this annotation

GitHub Actions / build

Element implicitly has an 'any' type because expression of type 'Language' can't be used to index type '{ KO: string; MM: string; VN: string; ID: string; EN: string; NP: string; TH: string; RU: string; } | { KO: string; MM: string; VN: string; ID: string; EN: string; NP: string; TH: string; RU: string; } | { KO: string; ... 6 more ...; RU: string; } | ... 972 more ... | { ...; }'.
};

return (
Expand All @@ -65,7 +67,7 @@
};

// 커스텀 훅
export const useLocalization = () => {

Check failure on line 70 in src/contexts/LocalizationContext.tsx

View workflow job for this annotation

GitHub Actions / build

Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
const context = useContext(LocalizationContext);
if (!context) {
throw new Error('useLocalization must be used within LocalizationProvider');
Expand Down
Loading
Loading