Skip to content

Commit

Permalink
refactor(components): refactor Hero component imports
Browse files Browse the repository at this point in the history
- Refactor the imports in the Hero component to use double quotes instead of single quotes for consistency.
- This improves code readability and maintainability.
- Also, update the arrow function syntax to use the arrow function shorthand.
- This commit improves the code style and consistency in the Hero component.
  • Loading branch information
phodal committed Feb 2, 2024
1 parent 6811bb4 commit f24ec8d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 36 deletions.
6 changes: 0 additions & 6 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

24 changes: 12 additions & 12 deletions src/components/templates/Hero.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import Link from 'next/link';
import { useTranslation } from 'react-i18next';
import Link from "next/link";
import { useTranslation } from "react-i18next";

import { Background } from '@/components/background/Background';
import { Button } from '@/components/button/Button';
import { HeroOneButton } from '@/components/hero/HeroOneButton';
import { NavbarTwoColumns } from '@/components/navigation/NavbarTwoColumns';
import { Section } from '@/layout/Section';
import { Background } from "@/components/background/Background";
import { Button } from "@/components/button/Button";
import { HeroOneButton } from "@/components/hero/HeroOneButton";
import { NavbarTwoColumns } from "@/components/navigation/NavbarTwoColumns";
import { Section } from "@/layout/Section";

import { Logo } from './Logo';
import { Logo } from "./Logo";

const Hero = function () {
const Hero = () => {
const { t } = useTranslation();

return (
Expand All @@ -26,8 +26,8 @@ const Hero = function () {
<HeroOneButton
title={
<>
<>{`${t('AI4SDLC')}\n`}</>
<span className="text-primary-500">{t('OS Solution')}</span>
<>{`${t("AI4SDLC")}\n`}</>
<span className="text-primary-500">{t("OS Solution")}</span>
</>
}
description="Unveiling Next-Gen Software Enginneering: Pioneering Architectural Paradigms with GenAI"
Expand All @@ -37,7 +37,7 @@ const Hero = function () {
target="_blank"
href="https://raw.githubusercontent.com/unit-mesh/whitebook/master/2023-whitebook.pdf"
>
<Button xl>{t('Download White Paper')}</Button>
<Button xl>{t("Download White Paper")}</Button>
</Link>
</>
}
Expand Down
36 changes: 18 additions & 18 deletions src/i18n/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ import { initReactI18next } from 'react-i18next';
const resources = {
zh: {
translation: {
AI4SDLC: '生成式 AI 赋能软件研发',
'OS Solution': '开源解决方案',
'Download White Paper': '下载《UnitMesh 技术白皮书》',
AI4SDLC: "生成式 AI 赋能软件研发",
"OS Solution": "开源解决方案",
"Download White Paper": "下载《UnitMesh 技术白皮书》",
// 端到端的开源 AI 赋能软件研发全流程
'E2E open source AI4SDLC': '端到端的开源 AI 赋能软件研发全流程',
"E2E open source AI4SDLC": "端到端的开源 AI 赋能软件研发全流程",
// 构建下一代软件生成式应用开发范式
'Build NG AI4SE': '构建下一代软件生成式应用开发范式',
"Build NG AI4SE": "构建下一代软件生成式应用开发范式",
// AI 编码助手
'AI-Assistant Development': 'AI 编码助手'
}
"AI-Assistant Development": "AI 编码助手",
},
},
'en-US': {
"en-US": {
translation: {
AI4SDLC: 'AI Empowered Software Development',
'OS Solution': 'Open Source Solution',
'Download White Paper': 'Download White Paper of UnitMesh Technology',
'E2E open source AI4SDLC': 'End-to-end open source AI4SDLC',
'Build NG AI4SE': 'Build next-gen AI4SDLC',
'AI-Assistant Development': 'AI-Assistant Development'
}
}
AI4SDLC: "AI Empowered Software Development",
"OS Solution": "Open Source Solution",
"Download White Paper": "Download White Paper of UnitMesh Technology",
"E2E open source AI4SDLC": "End-to-end open source AI4SDLC",
"Build NG AI4SE": "Build next-gen AI4SDLC",
"AI-Assistant Development": "AI-Assistant Development,
},
},
};

i18n
Expand All @@ -45,12 +45,12 @@ i18n

interpolation: {
escapeValue: false // react already safes from xss
}
},
},
(err) => {
if (err) return console.log('something went wrong loading', err);
console.log('i18n loaded successfully');
}
},
);

export default i18n;

0 comments on commit f24ec8d

Please sign in to comment.