File tree Expand file tree Collapse file tree 1 file changed +6
-16
lines changed
src/features/localization/services Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -4,27 +4,17 @@ import React from "react";
44
55import EnIntroduction from "@/features/introduction/docs/en.introduction.mdx" ;
66import JaIntroduction from "@/features/introduction/docs/ja.introduction.mdx" ;
7+ import { getIntroductionDictionary } from "./language-dictionary.service" ;
78
89interface GetIntroductionContentParams {
910 languageCode : string ;
1011}
1112
12- interface GetIntroductionContentResult {
13- Component : React . FC ;
14- }
15-
1613export const getIntroductionContent = (
17- params : GetIntroductionContentParams ,
18- ) : GetIntroductionContentResult => {
14+ params : GetIntroductionContentParams
15+ ) => {
1916 const { languageCode } = params ;
20-
21- if ( languageCode === "ja" ) {
22- return {
23- Component : JaIntroduction ,
24- } ;
25- }
26-
27- return {
28- Component : EnIntroduction ,
29- } ;
17+ const introductionDictionary = getIntroductionDictionary ( languageCode )
18+ const headings = introductionDictionary . content . headings
19+ return languageCode === "ja" ? < JaIntroduction headings = { headings } /> : < EnIntroduction headings = { headings } /> ;
3020} ;
You can’t perform that action at this time.
0 commit comments