Skip to content

Commit

Permalink
add named export, barrel
Browse files Browse the repository at this point in the history
  • Loading branch information
icetrust0212 committed Apr 3, 2024
1 parent 9b595b8 commit 36983b4
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 27 deletions.
4 changes: 1 addition & 3 deletions src/components/molecules/ContentBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface ContentBoxProps extends React.PropsWithChildren {
mainImageClassName?: string;
}

const ContentBox: React.FC<ContentBoxProps> = (props) => {
export const ContentBox: React.FC<ContentBoxProps> = (props) => {
const {
children,
title,
Expand Down Expand Up @@ -58,5 +58,3 @@ const ContentBox: React.FC<ContentBoxProps> = (props) => {
</motion.div>
);
};

export default ContentBox;
1 change: 1 addition & 0 deletions src/components/molecules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ export * from "./SearchInputField";
export * from "./SearchResultItem";
export * from "./ShareInfoCard";
export * from "./WalletAddressCard";
export * from "./ContentBox";
4 changes: 1 addition & 3 deletions src/components/organisms/HeroSection.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useIntl } from "react-intl";
import { motion } from "framer-motion";

const HeroSection = () => {
export const HeroSection = () => {
const i18n = useIntl();

const heroTagLabel = i18n.formatMessage({
Expand Down Expand Up @@ -66,5 +66,3 @@ const HeroSection = () => {
</motion.div>
);
};

export default HeroSection;
4 changes: 1 addition & 3 deletions src/components/organisms/JoinWaitlist.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useIntl } from "react-intl";
import { motion } from "framer-motion";

const JoinWaitlist = () => {
export const JoinWaitlist = () => {
const i18n = useIntl();

const joinTheVeridaWaitlistTitle = i18n.formatMessage({
Expand Down Expand Up @@ -46,5 +46,3 @@ const JoinWaitlist = () => {
</motion.div>
);
};

export default JoinWaitlist;
6 changes: 2 additions & 4 deletions src/components/organisms/LearnMore.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useIntl } from "react-intl";
import { motion } from "framer-motion";
import ContentBox from "../molecules/ContentBox";
import { ContentBox } from "../molecules";
import BracketsIcon from "../../assets/images/brackets-icon.svg";
import ArrowLeftIcon from "../../assets/images/arrow-left.svg";
import BlockchainIcon from "../../assets/images/blockchain-icon.svg";

const LearnMore = () => {
export const LearnMore = () => {
const i18n = useIntl();

const learnMore1Label = i18n.formatMessage({
Expand Down Expand Up @@ -94,5 +94,3 @@ const LearnMore = () => {
</motion.div>
);
};

export default LearnMore;
6 changes: 2 additions & 4 deletions src/components/organisms/Showcase.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useIntl } from "react-intl";
import ContentBox from "../molecules/ContentBox";
import { ContentBox } from "../molecules";
import ShowcasePhoneP from "../../assets/images/showcase-phones-p.webp";
import ShowcaseCardTopRightMin from "../../assets/images/showcase-card-top-right-min.png";
import ShowcaseCardLeftMin from "../../assets/images/showcase-card-left-min.png";
Expand All @@ -21,7 +21,7 @@ import Vector from "../../assets/images/Vector.png";
import Vector1 from "../../assets/images/Vector-1.png";
import IdentityImageMinP from "../../assets/images/identity-image-min-p-800.png";

const Showcase = () => {
export const Showcase = () => {
const i18n = useIntl();

const showcaseBoxLabel = i18n.formatMessage({
Expand Down Expand Up @@ -246,5 +246,3 @@ const Showcase = () => {
</>
);
};

export default Showcase;
4 changes: 4 additions & 0 deletions src/components/organisms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ export * from "./ShareModalProfileContent";
export * from "./ShareModalPlatformContent";
export * from "./SocialPlatformSection";
export * from "./WalletAddressesSection";
export * from "./LearnMore";
export * from "./Showcase";
export * from "./HeroSection";
export * from "./JoinWaitlist";
23 changes: 13 additions & 10 deletions src/components/pages/HomeView.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
import React from "react";
import { useIntl } from "react-intl";
import HeroSection from "../organisms/HeroSection";
import JoinWaitlist from "../organisms/JoinWaitlist";
import LearnMore from "../organisms/LearnMore";
import Showcase from "../organisms/Showcase";
import { HeroSection, JoinWaitlist, LearnMore, Showcase } from "../organisms";
import HeroBg from "../../assets/images/hero_bg.webp";
import FooterBg from "../../assets/images/footer-gradient-w1.webp";

export const HomeView: React.FunctionComponent = () => {
const i18n = useIntl();

const comingSoonMessage = i18n.formatMessage({
id: "HomeView.ComingSoon",
description: "Message stating that the app will be available soon",
defaultMessage: "Coming Soon",
const heroAltMsg = i18n.formatMessage({
id: "HomeView.HeroBG",
description: "Alt msg for Hero background image",
defaultMessage: "Hero image",
});

const footerAltMsg = i18n.formatMessage({
id: "HomeView.FooterBG",
description: "Alt msg for footer image",
defaultMessage: "Footer image",
});

return (
<div className="flex flex-grow flex-col items-center justify-center space-y-12">
<img
src={HeroBg}
alt={comingSoonMessage}
alt={heroAltMsg}
className="absolute bottom-auto left-0 right-0 top-0 z-[-1] h-[700px] w-full object-cover"
/>

Expand All @@ -36,7 +39,7 @@ export const HomeView: React.FunctionComponent = () => {

<img
src={FooterBg}
alt={comingSoonMessage}
alt={footerAltMsg}
className="absolute bottom-0 left-0 right-0 z-[-1]"
/>
</div>
Expand Down

0 comments on commit 36983b4

Please sign in to comment.