From 9f362f56951966bb4409b1b2abf06d038049558f Mon Sep 17 00:00:00 2001 From: MANDEEP N H <146331633+mandeepnh5@users.noreply.github.com> Date: Mon, 23 Dec 2024 18:23:04 +0000 Subject: [PATCH 1/3] Refactor Community Profile css --- .../CommunityProfile.module.css | 41 ------------------ .../CommunityProfile/CommunityProfile.tsx | 2 +- src/style/app.module.css | 43 +++++++++++++++++++ 3 files changed, 44 insertions(+), 42 deletions(-) delete mode 100644 src/screens/CommunityProfile/CommunityProfile.module.css diff --git a/src/screens/CommunityProfile/CommunityProfile.module.css b/src/screens/CommunityProfile/CommunityProfile.module.css deleted file mode 100644 index 1e6eac2bae..0000000000 --- a/src/screens/CommunityProfile/CommunityProfile.module.css +++ /dev/null @@ -1,41 +0,0 @@ -.card { - width: fit-content; -} - -.cardHeader { - padding: 1.25rem 1rem 1rem 1rem; - border-bottom: 1px solid var(--bs-gray-200); - display: flex; - justify-content: space-between; - align-items: center; -} - -.cardHeader .cardTitle { - font-size: 1.5rem; -} - -.formLabel { - font-weight: normal; - padding-bottom: 0; - font-size: 1rem; - color: black; -} -.cardBody { - min-height: 180px; -} - -.cardBody .textBox { - margin: 0 0 3rem 0; - color: var(--bs-secondary); -} - -.socialInput { - height: 2.5rem; -} - -@media (max-width: 520px) { - .btn { - flex-direction: column; - justify-content: center; - } -} diff --git a/src/screens/CommunityProfile/CommunityProfile.tsx b/src/screens/CommunityProfile/CommunityProfile.tsx index d96c923eb3..f5ed6dea7b 100644 --- a/src/screens/CommunityProfile/CommunityProfile.tsx +++ b/src/screens/CommunityProfile/CommunityProfile.tsx @@ -18,7 +18,7 @@ import { SlackLogo, } from 'assets/svgs/social-icons'; import convertToBase64 from 'utils/convertToBase64'; -import styles from './CommunityProfile.module.css'; +import styles from '../../style/app.module.css'; import { errorHandler } from 'utils/errorHandler'; import UpdateSession from '../../components/UpdateSession/UpdateSession'; diff --git a/src/style/app.module.css b/src/style/app.module.css index 6d6413aa86..1ef48c0b22 100644 --- a/src/style/app.module.css +++ b/src/style/app.module.css @@ -831,6 +831,49 @@ hr { color: #31bb6b !important; } +.card { + width: fit-content; +} + +.cardHeader { + padding: 1.25rem 1rem 1rem 1rem; + border-bottom: 1px solid var(--bs-gray-200); + display: flex; + justify-content: space-between; + align-items: center; +} + +.cardHeader .cardTitle { + font-size: 1.5rem; +} + +.formLabel { + font-weight: normal; + padding-bottom: 0; + font-size: 1rem; + color: black; +} +.cardBody { + min-height: 180px; +} + +.cardBody .textBox { + margin: 0 0 3rem 0; + color: var(--bs-secondary); +} + +.socialInput { + height: 2.5rem; +} + +@media (max-width: 520px) { + .btn { + flex-direction: column; + justify-content: center; + } +} + + @media (max-width: 1024px) { .pageNotFound h1.head { font-size: 200px; From f645454d482153ea83d45666e8d871be7405a26c Mon Sep 17 00:00:00 2001 From: MANDEEP N H <146331633+mandeepnh5@users.noreply.github.com> Date: Mon, 23 Dec 2024 18:29:30 +0000 Subject: [PATCH 2/3] Fix linting issues --- src/style/app.module.css | 1 - 1 file changed, 1 deletion(-) diff --git a/src/style/app.module.css b/src/style/app.module.css index 1ef48c0b22..3d161b52b1 100644 --- a/src/style/app.module.css +++ b/src/style/app.module.css @@ -873,7 +873,6 @@ hr { } } - @media (max-width: 1024px) { .pageNotFound h1.head { font-size: 200px; From 3c680a35062b0dd78dc4200e2a24d9486dfa14b4 Mon Sep 17 00:00:00 2001 From: MANDEEP N H <146331633+mandeepnh5@users.noreply.github.com> Date: Mon, 23 Dec 2024 18:41:19 +0000 Subject: [PATCH 3/3] Fix explicit lint issue --- src/screens/CommunityProfile/CommunityProfile.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/screens/CommunityProfile/CommunityProfile.tsx b/src/screens/CommunityProfile/CommunityProfile.tsx index f5ed6dea7b..05f328ced0 100644 --- a/src/screens/CommunityProfile/CommunityProfile.tsx +++ b/src/screens/CommunityProfile/CommunityProfile.tsx @@ -90,7 +90,7 @@ const CommunityProfile = (): JSX.Element => { React.useEffect(() => { const preLoginData: PreLoginImageryDataType | undefined = data?.getCommunityData; - preLoginData && + if (preLoginData) { setProfileVariable({ name: preLoginData.name ?? '', websiteLink: preLoginData.websiteLink ?? '', @@ -104,6 +104,7 @@ const CommunityProfile = (): JSX.Element => { reddit: preLoginData.socialMediaUrls.reddit ?? '', slack: preLoginData.socialMediaUrls.slack ?? '', }); + } }, [data]); /**