diff --git a/src/app/i18n/locales/en.json b/src/app/i18n/locales/en.json index 34acc95..4bc6544 100644 --- a/src/app/i18n/locales/en.json +++ b/src/app/i18n/locales/en.json @@ -50,6 +50,9 @@ }, "summary": { "label": "Summary" + }, + "hasNotSummary": { + "label": "Click on some of the experiences to see more details" } }, "formation": { diff --git a/src/app/i18n/locales/pt.json b/src/app/i18n/locales/pt.json index 9a371f5..d85bb20 100644 --- a/src/app/i18n/locales/pt.json +++ b/src/app/i18n/locales/pt.json @@ -50,6 +50,9 @@ }, "summary": { "label": "Resumo" + }, + "hasNotSummary": { + "label": "Clique em algumas das experiências para ver mais detalhes" } }, "formation": { diff --git a/src/app/page.tsx b/src/app/page.tsx index 06cae3a..29f2aec 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -28,13 +28,12 @@ import { GITHUB_LINK, EMAIL_LINK, LINKEDIN_LINK } from "./utils/contrants"; export default function Home() { const { t } = useTranslation(); - const { innerWidth: windowWidth } = window; const projectsHighlighted = projects.filter((project) => project.highlight); const [experiencesWithActive, setExperiencesWithActive] = useState( experiences.map((experience, index) => ({ ...experience, - active: index === 0 && windowWidth > 1024, + active: index === 0, })), ); @@ -44,15 +43,13 @@ export default function Home() { ); return activeExperience ? t(`data.experiences.${activeExperience.title}.description.label`) - : ""; + : t("pages.home.experience.hasNotSummary.label"); }, [experiencesWithActive, t]); function handleActiveExperienceChange(title: string) { const updatedExperiences = experiencesWithActive.map((experience) => ({ ...experience, - active: - experience.title === title && - (!experience.active || windowWidth > 1024), + active: experience.title === title && !experience.active, })); setExperiencesWithActive(updatedExperiences); }