From 235e1f675ff76805828ddfa8e65fc86484fe80c0 Mon Sep 17 00:00:00 2001 From: m-tartari <37861893+m-tartari@users.noreply.github.com> Date: Mon, 16 Jun 2025 13:56:42 +0000 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20use=20ESM=20im?= =?UTF-8?q?port=20notation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 5 +++-- src/components/molecules/Footer/index.tsx | 2 +- src/components/molecules/Hero/Hero.tsx | 4 ++-- src/components/pages/ContactPage/ContactPage.tsx | 2 +- src/components/pages/CurriculumPage/CurriculumPage.tsx | 6 +++--- src/components/pages/MainPage/MainPage.tsx | 4 ++-- src/components/pages/ProjectsPage/ProjectsPage.tsx | 6 +++--- src/components/templates/Page/Page.tsx | 2 +- 8 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 15c6958..874deb1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -49,6 +49,8 @@ // Javascript "javascript.updateImportsOnFileMove.enabled": "always", "typescript.updateImportsOnFileMove.enabled": "always", + "javascript.preferences.importModuleSpecifierEnding": "js", + "typescript.preferences.importModuleSpecifierEnding": "js", "typescript.suggest.paths": true, // json "[json,jsonc]": { @@ -68,9 +70,8 @@ "todo-tree.filtering.excludeGlobs": [ "**/node_modules" ], + // other extensions "vitest.enable": true, - "javascript.preferences.importModuleSpecifierEnding": "js", - "typescript.preferences.importModuleSpecifierEnding": "js", "cSpell.words": [ "SRDF", "URDF" diff --git a/src/components/molecules/Footer/index.tsx b/src/components/molecules/Footer/index.tsx index 4c3c915..a34a5de 100644 --- a/src/components/molecules/Footer/index.tsx +++ b/src/components/molecules/Footer/index.tsx @@ -4,7 +4,7 @@ import { Box, Link, Stack, Typography } from '@mui/material' import PolicyIcon from '@mui/icons-material/Policy' import CookieIcon from '@mui/icons-material/Cookie' -import { EmailIconLink, GitHubIconLink, LinkedInIconLink } from 'components/atoms' +import { EmailIconLink, GitHubIconLink, LinkedInIconLink } from 'components/atoms/IconLinks/index.js' import CookieConsent from 'components/molecules/CookieConsent/index.js' type FooterProps = { diff --git a/src/components/molecules/Hero/Hero.tsx b/src/components/molecules/Hero/Hero.tsx index bdf0552..3747d18 100644 --- a/src/components/molecules/Hero/Hero.tsx +++ b/src/components/molecules/Hero/Hero.tsx @@ -1,8 +1,8 @@ import React from 'react' import { Avatar, Box, IconButton, Stack, Typography } from '@mui/material' +import ExpandMore from '@mui/icons-material/ExpandMore' -import { EmailIconLink, GitHubIconLink, LinkedInIconLink } from 'components/atoms' -import { ExpandMore } from '@mui/icons-material' +import { EmailIconLink, GitHubIconLink, LinkedInIconLink } from 'components/atoms/IconLinks/index.js' const Hero = (props: { scrollTarget?: React.ForwardedRef }) => { return ( diff --git a/src/components/pages/ContactPage/ContactPage.tsx b/src/components/pages/ContactPage/ContactPage.tsx index 6dcbf0b..2cf4f25 100644 --- a/src/components/pages/ContactPage/ContactPage.tsx +++ b/src/components/pages/ContactPage/ContactPage.tsx @@ -3,7 +3,7 @@ import DraftsIcon from '@mui/icons-material/Drafts' import LinkedInIcon from '@mui/icons-material/LinkedIn' import GitHubIcon from '@mui/icons-material/GitHub' -import { Page } from 'components/templates' +import { Page } from 'components/templates/index.js' interface ListItemProps { children?: React.ReactNode diff --git a/src/components/pages/CurriculumPage/CurriculumPage.tsx b/src/components/pages/CurriculumPage/CurriculumPage.tsx index d2270cf..793135d 100644 --- a/src/components/pages/CurriculumPage/CurriculumPage.tsx +++ b/src/components/pages/CurriculumPage/CurriculumPage.tsx @@ -1,8 +1,8 @@ import { Box, Divider, Link, Stack, Table, TableCell, TableRow, Typography } from '@mui/material' -import { Award, ExternalIconLink, Extracurricular, Publication, SectionHeader, SectionSubheader } from 'components/atoms' -import { CurriculumItem } from 'components/molecules' -import { Page } from 'components/templates' +import { Award, ExternalIconLink, Extracurricular, Publication, SectionHeader, SectionSubheader } from 'components/atoms/index.js' +import { CurriculumItem } from 'components/molecules/index.js' +import { Page } from 'components/templates/index.js' const Curriculum = () => { return ( diff --git a/src/components/pages/MainPage/MainPage.tsx b/src/components/pages/MainPage/MainPage.tsx index c53d1a9..9d062bd 100644 --- a/src/components/pages/MainPage/MainPage.tsx +++ b/src/components/pages/MainPage/MainPage.tsx @@ -2,8 +2,8 @@ import React from 'react' import { Box, Stack, Typography } from '@mui/material' import { ViewportProvider } from 'components/utils/viewport' -import { AcademyIconLink, DescriptionIconLink, ExternalAppIconLink, GitHubIconLink, VideoIconLink } from 'components/atoms' -import { Footer, Hero, Toolbar, ProjectSpotlight } from 'components/molecules' +import { AcademyIconLink, DescriptionIconLink, ExternalAppIconLink, GitHubIconLink, VideoIconLink } from 'components/atoms/index.js' +import { Footer, Hero, Toolbar, ProjectSpotlight } from 'components/molecules/index.js' const MainPage = () => { React.useEffect(() => { diff --git a/src/components/pages/ProjectsPage/ProjectsPage.tsx b/src/components/pages/ProjectsPage/ProjectsPage.tsx index a5f410d..f8fb1b3 100644 --- a/src/components/pages/ProjectsPage/ProjectsPage.tsx +++ b/src/components/pages/ProjectsPage/ProjectsPage.tsx @@ -1,8 +1,8 @@ import { Box, Divider, Link, Typography } from '@mui/material' -import { GitHubIconLink, DescriptionIconLink, VideoIconLink, AcademyIconLink, ExternalAppIconLink } from 'components/atoms' -import { Project } from 'components/molecules' -import { Page } from 'components/templates' +import { GitHubIconLink, DescriptionIconLink, VideoIconLink, AcademyIconLink, ExternalAppIconLink } from 'components/atoms/index.js' +import { Project } from 'components/molecules/index.js' +import { Page } from 'components/templates/index.js' const ProjectsPage = () => { return ( diff --git a/src/components/templates/Page/Page.tsx b/src/components/templates/Page/Page.tsx index fdaa53f..9508681 100644 --- a/src/components/templates/Page/Page.tsx +++ b/src/components/templates/Page/Page.tsx @@ -1,7 +1,7 @@ import React from 'react' import { Box, BoxProps, Container, Divider, Typography } from '@mui/material' -import { Footer, Toolbar } from 'components/molecules' +import { Footer, Toolbar } from 'components/molecules/index.js' interface PageProps extends BoxProps { showCookieConsent?: boolean