Skip to content

Commit

Permalink
Fixed formatting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Shreyaschorge committed May 11, 2022
1 parent ef102fa commit 8d66b81
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 65 deletions.
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 80,
"tabWidth": 2,
"useTabs": false
}
8 changes: 0 additions & 8 deletions .prettierrc.js

This file was deleted.

116 changes: 59 additions & 57 deletions src/features/user/Profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function Profile({ userprofile, authenticatedType }: Props): ReactElement {

return (
<div>
{/* TO DO - find solution for this */}
{/* TO DO - find solution for this */}
{/* maybe we use this as edit button */}
{/* {authenticatedType === 'private' && (
<button
Expand All @@ -41,18 +41,20 @@ function Profile({ userprofile, authenticatedType }: Props): ReactElement {
<Settings color="white" />
</button>
)} */}
{/* userinfo section */}
<LandingSection
imageSrc={
process.env.CDN_URL
? `${process.env.CDN_URL}/media/images/app/bg_layer.jpg`
: `https://cdn.plant-for-the-planet.org/media/images/app/bg_layer.jpg`
}
style={{marginTop:'0px'}}
>
{/* {settingsModalOpen && (
{/* userinfo section */}
<LandingSection
imageSrc={
process.env.CDN_URL
? `${process.env.CDN_URL}/media/images/app/bg_layer.jpg`
: `https://cdn.plant-for-the-planet.org/media/images/app/bg_layer.jpg`
}
style={{
marginTop: '0px',
}}
>
{/* {settingsModalOpen && (
<SettingsModal
userType="tpo"
userType="tpo"x
userprofile={userprofile}
settingsModalOpen={settingsModalOpen}
handleSettingsModalClose={handleSettingsModalClose}
Expand All @@ -61,54 +63,54 @@ function Profile({ userprofile, authenticatedType }: Props): ReactElement {
handleEditProfileModalOpen={handleEditProfileModalOpen}
/>
)} */}
{userprofile && (
<div className={styles.landingContent}>
<TreeCounter
handleAddTargetModalOpen={() => {
setAddTargetModalOpen(true);
}}
authenticatedType={authenticatedType}
target={userprofile.score.target}
planted={
userprofile.type == 'tpo'
? userprofile.score.personal
: userprofile.score.personal + userprofile.score.received
}
/>

<h2 className={styles.treeCounterName}>
{userprofile.displayName}
</h2>
{/* user bio */}
<div className={styles.treeCounterDescription}>
{ready ? (
<ReadMoreReact
key={userprofile.bio || ''}
ideal={120}
readMoreText={t('donate:readMore')}
text={userprofile.bio || ''}
/>
) : null}
</div>
{/* icon for public view */}
{authenticatedType === 'public' && (
<UserShareAndSupport userprofile={userprofile} />
)}
{userprofile && (
<div className={styles.landingContent}>
<TreeCounter
handleAddTargetModalOpen={() => {
setAddTargetModalOpen(true);
}}
authenticatedType={authenticatedType}
target={userprofile.score.target}
planted={
userprofile.type == 'tpo'
? userprofile.score.personal
: userprofile.score.personal + userprofile.score.received
}
/>

{/* three icons in a row */}
{authenticatedType === 'private' && (
<UserProfileOptions userprofile={userprofile} />
)}
<h2 className={styles.treeCounterName}>
{userprofile.displayName}
</h2>
{/* user bio */}
<div className={styles.treeCounterDescription}>
{ready ? (
<ReadMoreReact
key={userprofile.bio || ''}
ideal={120}
readMoreText={t('donate:readMore')}
text={userprofile.bio || ''}
/>
) : null}
</div>
)}
</LandingSection>
{/* icon for public view */}
{authenticatedType === 'public' && (
<UserShareAndSupport userprofile={userprofile} />
)}

{/* three icons in a row */}
{authenticatedType === 'private' && (
<UserProfileOptions userprofile={userprofile} />
)}
</div>
)}
</LandingSection>

{/* add target modal */}
<AddTargetModal
userprofile={userprofile}
addTargetModalOpen={addTargetModalOpen}
handleAddTargetModalClose={() => setAddTargetModalOpen(false)}
/>
{/* add target modal */}
<AddTargetModal
userprofile={userprofile}
addTargetModalOpen={addTargetModalOpen}
handleAddTargetModalClose={() => setAddTargetModalOpen(false)}
/>
</div>
);
}
Expand Down

0 comments on commit 8d66b81

Please sign in to comment.