From 51446d0e16a3cba41e785c5f1ec2a5aa78d436f3 Mon Sep 17 00:00:00 2001 From: nicolasito1411 <60229704+Marchand-Nicolas@users.noreply.github.com> Date: Sat, 14 Oct 2023 17:52:14 +0200 Subject: [PATCH 1/5] feat: improving profile section --- .../UI/iconsComponents/icons/shareIcon.tsx | 25 +++++ components/UI/menus/bannerPopup.tsx | 47 ++++++++ components/UI/menus/popup.tsx | 32 ++---- components/UI/menus/sharePopup.tsx | 70 ++++++++++++ pages/[addressOrDomain].tsx | 106 +++++++++++------- pages/quest/[questPage].tsx | 4 +- styles/components/popup.module.css | 44 ++++++++ styles/profile.module.css | 27 +++-- styles/theme.ts | 2 +- 9 files changed, 283 insertions(+), 74 deletions(-) create mode 100644 components/UI/iconsComponents/icons/shareIcon.tsx create mode 100644 components/UI/menus/bannerPopup.tsx create mode 100644 components/UI/menus/sharePopup.tsx diff --git a/components/UI/iconsComponents/icons/shareIcon.tsx b/components/UI/iconsComponents/icons/shareIcon.tsx new file mode 100644 index 00000000..f266d0bd --- /dev/null +++ b/components/UI/iconsComponents/icons/shareIcon.tsx @@ -0,0 +1,25 @@ +import React, { FunctionComponent } from "react"; + +const ShareIcon: FunctionComponent = ({ color, width }) => { + return ( + <> + + + + + + + ); +}; + +export default ShareIcon; diff --git a/components/UI/menus/bannerPopup.tsx b/components/UI/menus/bannerPopup.tsx new file mode 100644 index 00000000..52ce1143 --- /dev/null +++ b/components/UI/menus/bannerPopup.tsx @@ -0,0 +1,47 @@ +import React, { FunctionComponent } from "react"; +import styles from "../../../styles/components/popup.module.css"; +import Button from "../button"; +import CloseIcon from "../iconsComponents/icons/closeIcon"; + +type BannerPopupProps = { + title: string; + banner: string; + description: string; + buttonName: string; + onClick: () => void; + onClose?: () => void; +}; + +const BannerPopup: FunctionComponent = ({ + title, + banner, + description, + buttonName, + onClick, + onClose, +}) => { + return ( +
+
+
+

{title}

+ banner +
+
+ +

{description}

+
+ +
+
+ {onClose && ( + + )} +
+
+ ); +}; + +export default BannerPopup; diff --git a/components/UI/menus/popup.tsx b/components/UI/menus/popup.tsx index e579c30b..4992b59e 100644 --- a/components/UI/menus/popup.tsx +++ b/components/UI/menus/popup.tsx @@ -1,39 +1,25 @@ -import React, { FunctionComponent } from "react"; +import React, { FunctionComponent, ReactNode } from "react"; import styles from "../../../styles/components/popup.module.css"; -import Button from "../button"; import CloseIcon from "../iconsComponents/icons/closeIcon"; type PopupProps = { - title: string; - banner: string; - description: string; - buttonName: string; - onClick: () => void; + children: ReactNode; + bottomContent?: ReactNode; onClose?: () => void; }; const Popup: FunctionComponent = ({ - title, - banner, - description, - buttonName, - onClick, + children, + bottomContent = null, onClose, }) => { return (
-
-

{title}

- banner -
-
- -

{description}

-
- -
-
+
{children}
+ {bottomContent && ( +
{bottomContent}
+ )} {onClose && ( +
+
+ } + > + <> +

Share

+
+ +
+ +
+

Twitter

+
+ +
+ +
+

Discord

+
+
+ + + ); +}; + +export default SharePopup; diff --git a/pages/[addressOrDomain].tsx b/pages/[addressOrDomain].tsx index 5973a81c..37e1fc4d 100644 --- a/pages/[addressOrDomain].tsx +++ b/pages/[addressOrDomain].tsx @@ -17,6 +17,9 @@ import { hasVerifiedSocials } from "../utils/profile"; import { useMediaQuery } from "@mui/material"; import VerifiedIcon from "../components/UI/iconsComponents/icons/verifiedIcon"; import CopyIcon from "../components/UI/iconsComponents/icons/copyIcon"; +import ShareIcon from "../components/UI/iconsComponents/icons/shareIcon"; +import theme from "../styles/theme"; +import SharePopup from "../components/UI/menus/sharePopup"; const AddressOrDomain: NextPage = () => { const router = useRouter(); @@ -35,6 +38,7 @@ const AddressOrDomain: NextPage = () => { const [achievements, setAchievements] = useState([]); const [soloBuildings, setSoloBuildings] = useState([]); const [selectedTab, setSelectedTab] = useState("nfts"); + const [showSharePopup, setShowSharePopup] = useState(false); useEffect(() => setNotFound(false), [dynamicRoute]); @@ -235,16 +239,17 @@ const AddressOrDomain: NextPage = () => { title={identity?.domain ?? minifyAddress(identity.addr)} isUppercase={true} content={ -
-
- starknet.id avatar - {/* We do not enable the profile pic change atm */} - {/* + <> +
+
+ starknet.id avatar + {/* We do not enable the profile pic change atm */} + {/*
{ />
*/} -
-
-
-
- {!copied ? ( - -
copyToClipboard()}> - -
-
- ) : ( - - )} -
-
- {typeof addressOrDomain === "string" && - isHexString(addressOrDomain) - ? minifyAddressWithChars(addressOrDomain, 8) - : minifyAddressWithChars(identity?.addr, 8)} -
- {sinceDate ? ( -
-

{sinceDate}

+
+
+
+ {!copied ? ( + +
copyToClipboard()}> + +
+
+ ) : ( + + )} +
+
+ {typeof addressOrDomain === "string" && + isHexString(addressOrDomain) + ? minifyAddressWithChars(addressOrDomain, 8) + : minifyAddressWithChars(identity?.addr, 8)} +
- ) : null} + {sinceDate ? ( +
+

{sinceDate}

+
+ ) : null} +
-
+ {hasVerifiedSocials(identity) ? ( + <> +
+
+ + +
+ + ) : null} + } /> - {hasVerifiedSocials(identity) ? ( - } - /> - ) : null} {

Loading

)} + {showSharePopup ? ( + setShowSharePopup(false)} + toCopy={window.location.href} + /> + ) : null}
); }; diff --git a/pages/quest/[questPage].tsx b/pages/quest/[questPage].tsx index e960dd0c..646bde92 100644 --- a/pages/quest/[questPage].tsx +++ b/pages/quest/[questPage].tsx @@ -13,7 +13,7 @@ import useHasRootDomain from "../../hooks/useHasRootDomain"; import useHasRootOrBraavosDomain from "../../hooks/useHasRootOrBraavosDomain"; import { useAccount } from "@starknet-react/core"; import { starknetIdAppLink } from "../../utils/links"; -import Popup from "../../components/UI/menus/popup"; +import BannerPopup from "../../components/UI/menus/bannerPopup"; const QuestPage: NextPage = () => { const router = useRouter(); @@ -79,7 +79,7 @@ const QuestPage: NextPage = () => { ) : (
{showDomainPopup && ( - Date: Mon, 16 Oct 2023 11:14:35 +0200 Subject: [PATCH 2/5] adding minifyAddressFromStrings --- pages/[addressOrDomain].tsx | 9 +++++---- utils/stringService.ts | 13 +++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/pages/[addressOrDomain].tsx b/pages/[addressOrDomain].tsx index 37e1fc4d..d659dcc8 100644 --- a/pages/[addressOrDomain].tsx +++ b/pages/[addressOrDomain].tsx @@ -2,7 +2,7 @@ import React, { useContext, useEffect, useLayoutEffect, useState } from "react"; import type { NextPage } from "next"; import styles from "../styles/profile.module.css"; import { useRouter } from "next/router"; -import { isHexString, minifyAddressWithChars } from "../utils/stringService"; +import { isHexString, minifyAddressFromStrings } from "../utils/stringService"; import { Connector, useAccount, useConnectors } from "@starknet-react/core"; import SocialMediaActions from "../components/UI/actions/socialmediaActions"; import { StarknetIdJsContext } from "../context/StarknetIdJsProvider"; @@ -273,9 +273,10 @@ const AddressOrDomain: NextPage = () => {
{typeof addressOrDomain === "string" && - isHexString(addressOrDomain) - ? minifyAddressWithChars(addressOrDomain, 8) - : minifyAddressWithChars(identity?.addr, 8)} + minifyAddressFromStrings( + [addressOrDomain, identity?.addr || ""], + 8 + )}
{sinceDate ? ( diff --git a/utils/stringService.ts b/utils/stringService.ts index 11b01a6b..c945ea17 100644 --- a/utils/stringService.ts +++ b/utils/stringService.ts @@ -89,3 +89,16 @@ export function numberToString(element: number | undefined): string { export function convertNumberToFixedLengthString(number: string): string { return number.padStart(12, "0"); } + +export function minifyAddressFromStrings( + strings: string[], + chars: number +): string { + for (let index = 0; index < strings.length; index++) { + const string = strings[index]; + if (string && isHexString(string)) { + return minifyAddressWithChars(string, chars); + } + } + return ""; +} From 04c851a27d838828552f9414e2b4345b5c322e2b Mon Sep 17 00:00:00 2001 From: nicolasito1411 <60229704+Marchand-Nicolas@users.noreply.github.com> Date: Mon, 16 Oct 2023 11:23:38 +0200 Subject: [PATCH 3/5] Using material UI modals --- components/UI/menus/bannerPopup.tsx | 11 +++++++++-- components/UI/menus/popup.tsx | 11 +++++++++-- styles/components/popup.module.css | 23 ++++++++--------------- 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/components/UI/menus/bannerPopup.tsx b/components/UI/menus/bannerPopup.tsx index 52ce1143..7c24f753 100644 --- a/components/UI/menus/bannerPopup.tsx +++ b/components/UI/menus/bannerPopup.tsx @@ -2,6 +2,7 @@ import React, { FunctionComponent } from "react"; import styles from "../../../styles/components/popup.module.css"; import Button from "../button"; import CloseIcon from "../iconsComponents/icons/closeIcon"; +import { Modal } from "@mui/material"; type BannerPopupProps = { title: string; @@ -21,7 +22,13 @@ const BannerPopup: FunctionComponent = ({ onClose, }) => { return ( -
+

{title}

@@ -40,7 +47,7 @@ const BannerPopup: FunctionComponent = ({ )}
-
+
); }; diff --git a/components/UI/menus/popup.tsx b/components/UI/menus/popup.tsx index 4992b59e..86e8cf4e 100644 --- a/components/UI/menus/popup.tsx +++ b/components/UI/menus/popup.tsx @@ -1,6 +1,7 @@ import React, { FunctionComponent, ReactNode } from "react"; import styles from "../../../styles/components/popup.module.css"; import CloseIcon from "../iconsComponents/icons/closeIcon"; +import { Modal } from "@mui/material"; type PopupProps = { children: ReactNode; @@ -14,7 +15,13 @@ const Popup: FunctionComponent = ({ onClose, }) => { return ( -
+
{children}
{bottomContent && ( @@ -26,7 +33,7 @@ const Popup: FunctionComponent = ({ )}
-
+ ); }; diff --git a/styles/components/popup.module.css b/styles/components/popup.module.css index 7e55a24c..7d3e2e7b 100644 --- a/styles/components/popup.module.css +++ b/styles/components/popup.module.css @@ -1,18 +1,8 @@ -.popupContainer { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 2; - display: flex; - justify-content: center; - align-items: center; - background-color: rgba(0, 0, 0, 0.5); -} - .popup { - position: relative; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); width: calc(100% - 2rem); max-width: 800px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); @@ -24,7 +14,10 @@ } .bannerPopup { - position: relative; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); width: calc(100% - 2rem); max-width: 800px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); From d4311a364a65537db52c6ab2a728b950430f54dd Mon Sep 17 00:00:00 2001 From: nicolasito1411 <60229704+Marchand-Nicolas@users.noreply.github.com> Date: Wed, 18 Oct 2023 18:29:36 +0200 Subject: [PATCH 4/5] improving UI and cleaning the code --- components/UI/profileCard.tsx | 20 ---- components/UI/profileCards.tsx | 168 +++++++++++++++++++++++++++++ pages/[addressOrDomain].tsx | 173 ++---------------------------- styles/profile.module.css | 2 +- tests/utils/stringService.test.js | 46 +++++--- types/frontTypes.d.ts | 7 +- 6 files changed, 216 insertions(+), 200 deletions(-) delete mode 100644 components/UI/profileCard.tsx create mode 100644 components/UI/profileCards.tsx diff --git a/components/UI/profileCard.tsx b/components/UI/profileCard.tsx deleted file mode 100644 index 2e03aded..00000000 --- a/components/UI/profileCard.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import React, { FunctionComponent } from "react"; -import styles from "../../styles/profile.module.css"; - -const ProfileCard: FunctionComponent = ({ - title, - content, - isUppercase = false, -}) => { - return ( -
-

- {title} -

-
- {content} -
- ); -}; - -export default ProfileCard; diff --git a/components/UI/profileCards.tsx b/components/UI/profileCards.tsx new file mode 100644 index 00000000..716f733d --- /dev/null +++ b/components/UI/profileCards.tsx @@ -0,0 +1,168 @@ +import React, { FunctionComponent, useState } from "react"; +import styles from "../../styles/profile.module.css"; +import { Tooltip } from "@mui/material"; +import CopyIcon from "./iconsComponents/icons/copyIcon"; +import VerifiedIcon from "./iconsComponents/icons/verifiedIcon"; +import { minifyAddressFromStrings } from "../../utils/stringService"; +import SocialMediaActions from "./actions/socialmediaActions"; +import ShareIcon from "./iconsComponents/icons/shareIcon"; +import SharePopup from "./menus/sharePopup"; +import theme from "../../styles/theme"; + +const ProfileCards: FunctionComponent = ({ + title, + identity, + addressOrDomain, + sinceDate, + achievements, + soloBuildings, +}) => { + const [showSharePopup, setShowSharePopup] = useState(false); + const [selectedTab, setSelectedTab] = useState("nfts"); + const [copied, setCopied] = useState(false); + + const copyToClipboard = () => { + setCopied(true); + navigator.clipboard.writeText(identity?.addr as string); + setTimeout(() => { + setCopied(false); + }, 1500); + }; + + return ( + <> +
+

{title}

+
+ <> +
+
+ starknet.id avatar + {/* We do not enable the profile pic change atm */} + {/* +
+ console.log("changing pfp")} + /> +
+
*/} +
+
+
+
+ {!copied ? ( + +
copyToClipboard()}> + +
+
+ ) : ( + + )} +
+
+ {typeof addressOrDomain === "string" && + minifyAddressFromStrings( + [addressOrDomain, identity?.addr || ""], + 8 + )} +
+
+ {sinceDate ? ( +
+

{sinceDate}

+
+ ) : null} +
+
+ {true ? ( + <> +
+
+ + +
+ + ) : null} + +
+
+

Progress

+
+ <> +
+
setSelectedTab("nfts")} + > + NFTs unlocked ({soloBuildings.length}) +
+
setSelectedTab("achievements")} + > + Achievements ({achievements.length}) +
+
+ {selectedTab === "nfts" ? ( +
+ {soloBuildings.map((building) => { + return ( +
+ +

{building.name}

+
+ ); + })} +
+ ) : null} + {selectedTab === "achievements" ? ( +
+ {achievements.map((achievement) => { + return ( +
+ +

+ Level {achievement.level} +

+

{achievement.name}

+
+ ); + })} +
+ ) : null} + +
+ {showSharePopup ? ( + setShowSharePopup(false)} + toCopy={window.location.href} + /> + ) : null} + + ); +}; + +export default ProfileCards; diff --git a/pages/[addressOrDomain].tsx b/pages/[addressOrDomain].tsx index d659dcc8..d1038717 100644 --- a/pages/[addressOrDomain].tsx +++ b/pages/[addressOrDomain].tsx @@ -2,24 +2,16 @@ import React, { useContext, useEffect, useLayoutEffect, useState } from "react"; import type { NextPage } from "next"; import styles from "../styles/profile.module.css"; import { useRouter } from "next/router"; -import { isHexString, minifyAddressFromStrings } from "../utils/stringService"; +import { isHexString } from "../utils/stringService"; import { Connector, useAccount, useConnectors } from "@starknet-react/core"; -import SocialMediaActions from "../components/UI/actions/socialmediaActions"; import { StarknetIdJsContext } from "../context/StarknetIdJsProvider"; -import { Tooltip } from "@mui/material"; import { hexToDecimal } from "../utils/feltService"; import { minifyAddress } from "../utils/stringService"; import { utils } from "starknetid.js"; import ErrorScreen from "../components/UI/screens/errorScreen"; -import ProfileCard from "../components/UI/profileCard"; import { Land } from "../components/lands/land"; -import { hasVerifiedSocials } from "../utils/profile"; import { useMediaQuery } from "@mui/material"; -import VerifiedIcon from "../components/UI/iconsComponents/icons/verifiedIcon"; -import CopyIcon from "../components/UI/iconsComponents/icons/copyIcon"; -import ShareIcon from "../components/UI/iconsComponents/icons/shareIcon"; -import theme from "../styles/theme"; -import SharePopup from "../components/UI/menus/sharePopup"; +import ProfileCards from "../components/UI/profileCards"; const AddressOrDomain: NextPage = () => { const router = useRouter(); @@ -30,15 +22,12 @@ const AddressOrDomain: NextPage = () => { const [initProfile, setInitProfile] = useState(false); const [identity, setIdentity] = useState(); const [notFound, setNotFound] = useState(false); - const [copied, setCopied] = useState(false); const [isOwner, setIsOwner] = useState(false); const dynamicRoute = useRouter().asPath; const isMobile = useMediaQuery("(max-width:768px)"); const [sinceDate, setSinceDate] = useState(null); const [achievements, setAchievements] = useState([]); const [soloBuildings, setSoloBuildings] = useState([]); - const [selectedTab, setSelectedTab] = useState("nfts"); - const [showSharePopup, setShowSharePopup] = useState(false); useEffect(() => setNotFound(false), [dynamicRoute]); @@ -197,14 +186,6 @@ const AddressOrDomain: NextPage = () => { } }, [addressOrDomain, address, dynamicRoute]); - const copyToClipboard = () => { - setCopied(true); - navigator.clipboard.writeText(identity?.addr as string); - setTimeout(() => { - setCopied(false); - }, 1500); - }; - if (notFound) { return ( { setSoloBuildings={setSoloBuildings} />
- -
-
- starknet.id avatar - {/* We do not enable the profile pic change atm */} - {/* -
- console.log("changing pfp")} - /> -
-
*/} -
-
-
-
- {!copied ? ( - -
copyToClipboard()}> - -
-
- ) : ( - - )} -
-
- {typeof addressOrDomain === "string" && - minifyAddressFromStrings( - [addressOrDomain, identity?.addr || ""], - 8 - )} -
-
- {sinceDate ? ( -
-

{sinceDate}

-
- ) : null} -
-
- {hasVerifiedSocials(identity) ? ( - <> -
-
- - -
- - ) : null} - - } - /> - -
-
setSelectedTab("nfts")} - > - NFTs unlocked ({soloBuildings.length}) -
-
setSelectedTab("achievements")} - > - Achievements ({achievements.length}) -
-
- {selectedTab === "nfts" ? ( -
- {soloBuildings.map((building) => { - return ( -
- -

{building.name}

-
- ); - })} -
- ) : null} - {selectedTab === "achievements" ? ( -
- {achievements.map((achievement) => { - return ( -
- -

- Level {achievement.level} -

-

- {achievement.name} -

-
- ); - })} -
- ) : null} - - } +
@@ -382,12 +233,6 @@ const AddressOrDomain: NextPage = () => {

Loading

)} - {showSharePopup ? ( - setShowSharePopup(false)} - toCopy={window.location.href} - /> - ) : null}
); }; diff --git a/styles/profile.module.css b/styles/profile.module.css index 444823b0..46f1cb3d 100644 --- a/styles/profile.module.css +++ b/styles/profile.module.css @@ -18,6 +18,7 @@ gap: 16px; display: flex; flex-direction: column; + bottom: 16px; } .profileCard { @@ -29,7 +30,6 @@ border-radius: 8px; background: var(--background600, #29282b); width: 310px; - max-height: calc(100vh - 12vh - 350px); } .title { diff --git a/tests/utils/stringService.test.js b/tests/utils/stringService.test.js index de49b295..7cb61eb3 100644 --- a/tests/utils/stringService.test.js +++ b/tests/utils/stringService.test.js @@ -8,6 +8,7 @@ import { minifyDomain, generateString, numberToString, + minifyAddressFromStrings, // getDomainKind, shortenDomain, minifyAddressWithChars, @@ -123,7 +124,9 @@ describe("Should test isStarkDomain", () => { ) && utils.isStarkDomain(randomString + "." + randomString2 + "..stark") && utils.isStarkDomain(randomString + "." + randomString2 + "..stark") && - utils.isStarkDomain("." + randomString + ".." + randomString2 + ".stark") && + utils.isStarkDomain( + "." + randomString + ".." + randomString2 + ".stark" + ) && utils.isStarkDomain("." + randomString + "." + randomString2 + ".stark") ).toBeFalsy(); }); @@ -260,23 +263,40 @@ describe("Should test shortenDomain function", () => { }); }); -describe('minifyAddressWithChars function', () => { - it('should return empty string if address is undefined', () => { - expect(minifyAddressWithChars(undefined, 4)).toBe(''); +describe("minifyAddressWithChars function", () => { + it("should return empty string if address is undefined", () => { + expect(minifyAddressWithChars(undefined, 4)).toBe(""); + }); + + it("should return minified address with specified number of characters at the start and end", () => { + const address = "1234567890abcdef"; + expect(minifyAddressWithChars(address, 4)).toBe("1234...cdef"); + }); + + it("should return the original address if number of characters is equal to half the length of the address", () => { + const address = "12345678"; + expect(minifyAddressWithChars(address, 4)).toBe("12345678"); }); - it('should return minified address with specified number of characters at the start and end', () => { - const address = '1234567890abcdef'; - expect(minifyAddressWithChars(address, 4)).toBe('1234...cdef'); + it("should return minified address in lowercase", () => { + const address = "ABCDEFGH"; + expect(minifyAddressWithChars(address, 3)).toBe("abc...fgh"); + }); +}); + +describe("minifyAddressFromStrings", () => { + it("Should returns an empty string if the string array is empty", () => { + const result = minifyAddressFromStrings([], 4); + expect(result).toEqual(""); }); - it('should return the original address if number of characters is equal to half the length of the address', () => { - const address = '12345678'; - expect(minifyAddressWithChars(address, 4)).toBe('12345678'); + it("Should returns the minified version of the first string corresponding to a valid address in the array", () => { + const result = minifyAddressFromStrings(["0x1234567890abcdef", "test"], 4); + expect(result).toEqual("0x12...cdef"); }); - it('should return minified address in lowercase', () => { - const address = 'ABCDEFGH'; - expect(minifyAddressWithChars(address, 3)).toBe('abc...fgh'); + it("Should returns the minified version of the first string corresponding to a valid address in the array", () => { + const result = minifyAddressFromStrings(["test2", "0x1234567890abcdef"], 4); + expect(result).toEqual("0x12...cdef"); }); }); diff --git a/types/frontTypes.d.ts b/types/frontTypes.d.ts index ff2de17e..79e9e846 100644 --- a/types/frontTypes.d.ts +++ b/types/frontTypes.d.ts @@ -142,8 +142,11 @@ type SquareStyle = "bottomRight" | "bottomLeft" | "topRight" | "topLeft"; type ProfileCard = { title: string; - isUppercase?: boolean; - content: React.ReactNode; + identity: Identity; + addressOrDomain: string | string[] | undefined; + sinceDate: string | null; + achievements: BuildingsInfo[]; + soloBuildings: BuildingsInfo[]; }; type UserAchievement = { From 1f3b11a7991b14e253b4437503de962edb0a93a4 Mon Sep 17 00:00:00 2001 From: nicolasito1411 <60229704+Marchand-Nicolas@users.noreply.github.com> Date: Wed, 18 Oct 2023 18:36:31 +0200 Subject: [PATCH 5/5] removing constant condition --- components/UI/profileCards.tsx | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/components/UI/profileCards.tsx b/components/UI/profileCards.tsx index 716f733d..2dd00da5 100644 --- a/components/UI/profileCards.tsx +++ b/components/UI/profileCards.tsx @@ -81,24 +81,19 @@ const ProfileCards: FunctionComponent = ({ ) : null}
- {true ? ( - <> -
-
- - -
- - ) : null} + <> +
+
+ + +
+