Skip to content

Commit 416f4c6

Browse files
committed
refactor(imports): update alias paths and replace relative imports with absolute paths
1 parent f55c1cd commit 416f4c6

File tree

94 files changed

+964
-1024
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+964
-1024
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Available aliases:
4646
- `@constants/*` - Constants from `src/constants/`
4747
- `@services/*` - Services from `src/services/`
4848
- `@hooks/*` - Hooks from `src/hooks/`
49-
- `@assets/*` - Assets from `src/assets/`
49+
- `@/assets/*` - Assets from `src/assets/`
5050
- `@styles/*` - Styles from `src/styles/`
5151
- `@views/*` - Views from `src/views/`
5252
- `@utils/*` - Utilities from `src/utils/`

package-lock.json

Lines changed: 186 additions & 102 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"sass": "^1.89.0",
4040
"styled-components": "^6.1.12",
4141
"swiper": "^9.2.0",
42+
"tailwind-merge": "^3.3.1",
4243
"typescript": "^4.9.5",
4344
"web-vitals": "^5.0.2"
4445
},
@@ -85,7 +86,8 @@
8586
"autoprefixer": "^10.4.21",
8687
"babel-plugin-import": "^1.13.8",
8788
"eslint": "^9.26.0",
88-
"eslint-import-resolver-typescript": "^4.3.4",
89+
"eslint-import-resolver-alias": "^1.1.2",
90+
"eslint-import-resolver-typescript": "^4.4.4",
8991
"eslint-plugin-import": "^2.31.0",
9092
"eslint-plugin-jsx-a11y": "^6.10.2",
9193
"eslint-plugin-react": "^7.37.5",

src/2023/Attendee/AttendeeInformation2023.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ const SectionWrapper = styled.div`
5959
max-width: 1280px;
6060
`;
6161

62-
const AttendeeInformation2023: FC<React.PropsWithChildren<unknown>> = () => {
62+
export const AttendeeInformation2023: FC<
63+
React.PropsWithChildren<unknown>
64+
> = () => {
6365
return (
6466
<main>
6567
<h1 style={{ color: Color.LIGHT_BLUE, paddingTop: "100px" }}>
@@ -357,4 +359,5 @@ const AttendeeInformation2023: FC<React.PropsWithChildren<unknown>> = () => {
357359
</main>
358360
);
359361
};
362+
360363
export default AttendeeInformation2023;

src/2023/Cfp/CfpSection2023.tsx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
import React, { FC } from "react";
2-
import SectionWrapper from "../../components/SectionWrapper/SectionWrapper";
3-
import { Color } from "../../styles/colors";
2+
import { SectionWrapper } from "@components/SectionWrapper/SectionWrapper";
3+
import { Color } from "@styles/colors";
44
import {
55
StyledLessIcon,
66
StyledMoreIcon,
77
StyledSpeakersSection,
88
} from "../Speakers/Speakers.style";
9-
import TitleSection from "../../components/SectionTitle/TitleSection";
10-
import { MOBILE_BREAKPOINT } from "../../constants/BreakPoints";
11-
import MoreThanBlueWhiteIcon from "../../assets/images/MoreThanBlueWhiteIcon.svg";
12-
import LessThanBlueWhiteIcon from "../../assets/images/LessThanBlueWhiteIcon.svg";
9+
import TitleSection from "@components/SectionTitle/TitleSection";
10+
import { MOBILE_BREAKPOINT } from "@constants/BreakPoints";
1311
import { useWindowSize } from "react-use";
14-
import TwitterIcon from "../../components/Icons/Twitter";
15-
import LinkedinIcon from "../../components/Icons/Linkedin";
12+
import TwitterIcon from "@components/Icons/Twitter";
13+
import LinkedinIcon from "@components/Icons/Linkedin";
1614

17-
import conferenceData from "../../data/2023.json";
15+
import conferenceData from "@data/2023.json";
1816
import { CfpTrackProps, data } from "./CfpData";
1917
import { styled } from "styled-components";
2018
import {
2119
StyledAboutImage,
2220
StyledSocialIconsWrapper,
23-
} from "../../views/About/components/Style.AboutCard";
24-
import { useDocumentTitleUpdater } from "../../hooks/useDocumentTitleUpdate";
21+
} from "@views/About/components/Style.AboutCard";
22+
import { useDocumentTitleUpdater } from "@hooks/useDocumentTitleUpdate";
2523

2624
const TrackName = styled.h2`
2725
padding-top: 1.2rem;
@@ -94,11 +92,11 @@ const CfpSection2023: FC<React.PropsWithChildren<unknown>> = () => {
9492
<>
9593
<StyledLessIcon
9694
title="Less than - icon"
97-
src={MoreThanBlueWhiteIcon}
95+
src="/images/MoreThanBlueWhiteIcon.svg"
9896
/>
9997
<StyledMoreIcon
10098
title="more than - icon"
101-
src={LessThanBlueWhiteIcon}
99+
src="/images/LessThanBlueWhiteIcon.svg"
102100
/>
103101
</>
104102
)}

src/2023/Communities/Communities2023.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React, { FC } from "react";
22
import { styled } from "styled-components";
3-
import TwitterIcon from "../../components/Icons/Twitter";
4-
import { Color } from "../../styles/colors";
5-
import WebsiteIcon from "../../components/Icons/website";
6-
import { useDocumentTitleUpdater } from "../../hooks/useDocumentTitleUpdate";
3+
import TwitterIcon from "@components/Icons/Twitter";
4+
import { Color } from "@styles/colors";
5+
import WebsiteIcon from "@components/Icons/website";
6+
import { useDocumentTitleUpdater } from "@hooks/useDocumentTitleUpdate";
77

88
const Heading = styled.h1`
99
padding-top: 10rem;
@@ -29,7 +29,7 @@ const FoSS = styled.div`
2929
}
3030
`;
3131

32-
const Communities2023: FC<React.PropsWithChildren<unknown>> = () => {
32+
export const Communities2023: FC<React.PropsWithChildren<unknown>> = () => {
3333
useDocumentTitleUpdater("Communities", "2023");
3434
return (
3535
<>
@@ -219,4 +219,5 @@ const Communities2023: FC<React.PropsWithChildren<unknown>> = () => {
219219
</>
220220
);
221221
};
222+
222223
export default Communities2023;

src/2023/Home/Home2023Wrapper.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ export const Home2023Wrapper: FC<React.PropsWithChildren<unknown>> = () => {
4242
</StyledContainer>
4343
);
4444
};
45+
46+
export default Home2023Wrapper;

src/2023/Home/components/Faqs/Faqs.tsx

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
import { Color } from "../../../../styles/colors";
1+
import { Color } from "@styles/colors";
22
import { FC, Suspense } from "react";
33
import FaqCard from "./components/FaqsCard";
4-
import LessThanIcon from "../../../../assets/images/LessThanBlueIcon.svg";
5-
import MoreThanIcon from "../../../../assets/images/LessThanBlueWhiteIcon.svg";
6-
import SectionWrapper from "../../../../components/SectionWrapper/SectionWrapper";
7-
import { faqsData } from "./FaqsData";
84
import { useWindowSize } from "react-use";
9-
import { MOBILE_BREAKPOINT } from "../../../../constants/BreakPoints";
10-
import flickr from "../../../../assets/images/flickr.svg";
11-
import youtube from "../../../../assets/images/youtube.svg";
12-
import slides from "../../../../assets/images/slides.png";
13-
import Logo from "../../../../assets/images/logo.svg";
14-
import { StyledLoadingImage } from "../../../../components/Loading/Loading";
5+
import { MOBILE_BREAKPOINT } from "@constants/BreakPoints";
6+
import { StyledLoadingImage } from "@components/Loading/Loading";
7+
import { SectionWrapper } from "@components/SectionWrapper/SectionWrapper";
158
import {
169
StyledFaqSection,
1710
StyledH2,
@@ -21,6 +14,7 @@ import {
2114
StyleLessIcon,
2215
StyleMoreIcon,
2316
} from "./Faqs.style";
17+
import { faqsData } from "@views/Home/components/Faqs/FaqsData";
2418

2519
const Faqs: FC<React.PropsWithChildren<unknown>> = () => {
2620
const { width } = useWindowSize();
@@ -34,13 +28,17 @@ const Faqs: FC<React.PropsWithChildren<unknown>> = () => {
3428
<div id="last-jbcnconf">&nbsp;</div>
3529
<div style={{ width: "60%" }}>
3630
<StyledH2>Check last JBCNConf edition</StyledH2>
37-
<Suspense fallback={<StyledLoadingImage src={Logo} />}>
31+
<Suspense
32+
fallback={<StyledLoadingImage src={"/images/logo.svg"} />}
33+
>
3834
<StyledImage
3935
src="images/jbcnconf/jbcnconf-1.jpg"
4036
alt="JBCNConf"
4137
/>
4238
</Suspense>
43-
<Suspense fallback={<StyledLoadingImage src={Logo} />}>
39+
<Suspense
40+
fallback={<StyledLoadingImage src={"/images/logo.svg"} />}
41+
>
4442
<StyledImage
4543
src="images/jbcnconf/jbcnconf-2.jpg"
4644
alt="JBCNConf - Keynote"
@@ -58,27 +56,42 @@ const Faqs: FC<React.PropsWithChildren<unknown>> = () => {
5856
rel="noreferrer"
5957
target="_blank"
6058
>
61-
<img src={flickr} alt="flickr" height={32} width={32} />
59+
<img
60+
src="/images/flickr.svg"
61+
alt="flickr"
62+
height={32}
63+
width={32}
64+
/>
6265
</a>
6366
<a
6467
href="https://www.youtube.com/watch?v=zFPpwRyl4Iw&list=PLo0fJV3LkR3z42GevLgXlQfNFP2qfgtrq"
6568
rel="noreferrer"
6669
target="_blank"
6770
>
68-
<img src={youtube} alt="Youtube" height={32} width={32} />
71+
<img
72+
src="/images/youtube.svg"
73+
alt="Youtube"
74+
height={32}
75+
width={32}
76+
/>
6977
</a>
7078
<a
7179
href="https://docs.google.com/presentation/d/1t1RnYOqcoP8Bo1GVyiGyW-mY_2bBpUspnW8nqXDUbGI/edit?usp=sharing"
7280
rel="noreferrer"
7381
target="_blank"
7482
>
75-
<img src={slides} alt="Summary Slides" height={32} width={32} />
83+
<img
84+
src="/images/slides.png"
85+
alt="Summary Slides"
86+
height={32}
87+
width={32}
88+
/>
7689
</a>
7790
</div>
7891
{width > MOBILE_BREAKPOINT && (
7992
<>
80-
<StyleMoreIcon src={MoreThanIcon} />
81-
<StyleLessIcon src={LessThanIcon} />
93+
<StyleMoreIcon src="/images/LessThanBlueWhiteIcon.svg" />
94+
<StyleLessIcon src="/images/LessThanBlueIcon.svg" />
8295
</>
8396
)}
8497
</StyledFaqSection>

src/2023/Home/components/Faqs/components/FaqsCard.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { FC, Suspense } from "react";
2-
import Logo from "../../../../../assets/images/logo.svg";
3-
import { StyledLoadingImage } from "../../../../../components/Loading/Loading";
2+
import { StyledLoadingImage } from "@components/Loading/Loading";
43
import {
54
FaqCardType,
65
StyledFaqCard,
@@ -17,7 +16,7 @@ const FaqCard: FC<React.PropsWithChildren<FaqCardType>> = ({ faq, index }) => {
1716
return (
1817
<StyledFaqCard className="faq-card">
1918
<StyledFaqImageContainer padding={isOdd ? "0 1rem 0 0" : "0 0 0 1rem"}>
20-
<Suspense fallback={<StyledLoadingImage src={Logo} />}>
19+
<Suspense fallback={<StyledLoadingImage src="/images/logo.svg" />}>
2120
<StyledFaqImage src={`images/2023/FaqsImage${index}.png`} />
2221
</Suspense>
2322
</StyledFaqImageContainer>

src/2023/Home/components/Home/Home.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import Countdown from "react-countdown";
22
import { FC } from "react";
33
import data from "@data/2023.json";
4-
import LessThanIcon from "@assets/images/MoreThanBlueWhiteIcon.svg";
5-
import SectionWrapper from "@components/SectionWrapper/SectionWrapper";
6-
import { BIG_BREAKPOINT, LARGE_BREAKPOINT } from "@constants/BreakPoints";
7-
import { useWindowSize } from "react-use";
84
import {
95
StyledBlueSlash,
106
StyledBottomSlash,
@@ -17,14 +13,16 @@ import {
1713
StyledTopSlash,
1814
StyleHomeContainer,
1915
} from "./Style.Home";
20-
import logo from "@assets/images/logo.png";
16+
import { useWindowSize } from "react-use";
17+
import { SectionWrapper } from "@components/SectionWrapper/SectionWrapper";
2118
import ActionButtons from "../ActionButtons/ActionButtons";
2219
import { styled } from "styled-components";
2320
import { Color } from "@styles/colors";
2421
import InfoButtons from "../InfoButtons/InfoButtons";
2522
import MultimediaInfoButtons from "../MultimediaInfoButtons/MultimediaInfoButtons";
2623
import CountDownCompleted from "@views/Home/components/Home/components/CountDownCompleted";
2724
import TimeCountDown from "@views/Home/components/Home/components/TimeCountdown";
25+
import { BIG_BREAKPOINT, LARGE_BREAKPOINT } from "@constants/BreakPoints";
2826

2927
const StyledLogo = styled.img`
3028
margin: 20px;
@@ -41,7 +39,7 @@ const Home: FC<React.PropsWithChildren<unknown>> = () => {
4139
<StyledHomaImage>
4240
<SectionWrapper color="transparent">
4341
<StyleHomeContainer>
44-
<StyledLogo src={logo} alt="DevBcn logo" />
42+
<StyledLogo src="/images/logo.png" alt="DevBcn logo" />
4543
<StyledTitleContainer>
4644
<StyledTitle>The Barcelona Developers Conference 2023</StyledTitle>
4745
<StyledSubtitle>
@@ -87,7 +85,9 @@ const Home: FC<React.PropsWithChildren<unknown>> = () => {
8785
DevBcn 2023 edition resources
8886
</h2>
8987
<MultimediaInfoButtons />
90-
{width > LARGE_BREAKPOINT && <StyledLessThan src={LessThanIcon} />}
88+
{width > LARGE_BREAKPOINT && (
89+
<StyledLessThan src={"/images/MoreThanBlueWhiteIcon.svg"} />
90+
)}
9191
<StyledTopSlash
9292
initial={{ x: "100%" }}
9393
animate={{ x: 0 }}

0 commit comments

Comments
 (0)