Skip to content

Commit

Permalink
changed
Browse files Browse the repository at this point in the history
  • Loading branch information
gurramkarthiknetha committed Dec 4, 2024
1 parent 3d1f1f0 commit 90b1d16
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 55 deletions.
2 changes: 0 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run format:fix
# npm run lint:fix
Expand Down
41 changes: 0 additions & 41 deletions src/screens/CommunityProfile/CommunityProfile.module.css
Original file line number Diff line number Diff line change
@@ -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;
}
}
21 changes: 9 additions & 12 deletions src/screens/CommunityProfile/CommunityProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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 ?? '',
Expand All @@ -104,6 +104,7 @@ const CommunityProfile = (): JSX.Element => {
reddit: preLoginData.socialMediaUrls.reddit ?? '',
slack: preLoginData.socialMediaUrls.slack ?? '',
});
}
}, [data]);

/**
Expand Down Expand Up @@ -193,19 +194,15 @@ const CommunityProfile = (): JSX.Element => {
* @returns boolean - True if buttons should be disabled, otherwise false
*/
const isDisabled = (): boolean => {
if (
profileVariable.name == '' &&
profileVariable.websiteLink == '' &&
profileVariable.logoUrl == ''
) {
return true;
} else {
return false;
}
return (
profileVariable.name === '' &&
profileVariable.websiteLink === '' &&
profileVariable.logoUrl === ''
);
};

if (loading) {
<Loader />;
return <Loader />;
}

return (
Expand Down
41 changes: 41 additions & 0 deletions src/style/app.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -505,3 +505,44 @@ hr {
transform: rotate(360deg);
}
}
.card {
width: 100%;
max-width: 800px;
}
.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: var(--bs-text-color, #212529);
}
.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;
}
}

0 comments on commit 90b1d16

Please sign in to comment.