-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: mission control create * fix: remove logs * metamask payment (#1131) * hotfix - manual reload * fix: hide payment ledger bottom action bar when modal is visible (#1133) * feat: pod page * feat: show pods list [wip] * feat: pods list * feat: create new pod * feat: search pods * fix: show pod tab only for orgs * fix: collaboration link * fix: replaced mui components with custom styled-components * fix: podview naming * refactor: use useQuery instead of useLazyQuery * fix: add pod link with && operator * fix: collaborations pathname Co-authored-by: Andros <wong22@hotmail.co.uk> Co-authored-by: Terry Li <terryli0095@gmail.com>
- Loading branch information
1 parent
138bbe7
commit 74a7c2a
Showing
11 changed files
with
588 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
wondrous-app/components/organization/pods/PodItem/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import RolePill from 'components/Common/RolePill'; | ||
import PodIcon from 'components/Icons/podIcon'; | ||
import MemberIcon from 'components/Icons/Sidebar/people.svg'; | ||
import { useOrgBoard } from 'utils/hooks'; | ||
import { | ||
PodDescriptionText, | ||
PodItemContainer, | ||
PodItemContributorsCount, | ||
PodItemDetails, | ||
PodItemDetailsContainer, | ||
PodItemIconWrapper, | ||
PodItemStats, | ||
PodItemStatsContainer, | ||
PodNameText, | ||
} from './styles'; | ||
|
||
const PodItem = (props) => { | ||
const { podData } = props; | ||
|
||
const { userPermissionsContext } = useOrgBoard() || {}; | ||
|
||
const podId = podData?.id; | ||
const bgColor = podData?.color; | ||
const podName = podData?.name; | ||
const podDescription = podData?.description; | ||
const contributorCount = podData?.contributorCount || 0; | ||
const role = userPermissionsContext?.podRoles[podId]; | ||
|
||
return ( | ||
<PodItemContainer> | ||
<PodItemDetailsContainer> | ||
<PodItemIconWrapper bgColor={bgColor}> | ||
<PodIcon /> | ||
</PodItemIconWrapper> | ||
<PodItemDetails> | ||
<PodNameText>{podName}</PodNameText> | ||
{!!podDescription && <PodDescriptionText>{podDescription}</PodDescriptionText>} | ||
</PodItemDetails> | ||
</PodItemDetailsContainer> | ||
<PodItemStatsContainer> | ||
<PodItemStats> | ||
<MemberIcon /> | ||
<PodItemContributorsCount>{contributorCount}</PodItemContributorsCount> | ||
</PodItemStats> | ||
<RolePill roleName={role} /> | ||
</PodItemStatsContainer> | ||
</PodItemContainer> | ||
); | ||
}; | ||
|
||
export default PodItem; |
86 changes: 86 additions & 0 deletions
86
wondrous-app/components/organization/pods/PodItem/styles.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import { Typography } from '@mui/material'; | ||
import styled from 'styled-components'; | ||
import palette from 'theme/palette'; | ||
|
||
export const PodItemContainer = styled.div` | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
gap: 65px; | ||
background: ${palette.background.default}; | ||
transition: background 0.2s ease-in-out; | ||
border-radius: 6px; | ||
padding: 20px; | ||
&:hover { | ||
background: ${palette.grey95}; | ||
} | ||
`; | ||
|
||
export const PodItemDetailsContainer = styled.div` | ||
display: flex; | ||
align-items: center; | ||
gap: 16px; | ||
max-width: 400px; | ||
overflow: hidden; | ||
`; | ||
|
||
export const PodItemDetails = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 8px; | ||
`; | ||
|
||
export const PodNameText = styled(Typography)` | ||
&& { | ||
color: ${palette.blue20}; | ||
font-weight: 700; | ||
font-size: 15px; | ||
} | ||
`; | ||
|
||
export const PodDescriptionText = styled(Typography)` | ||
&& { | ||
color: ${palette.grey250}; | ||
font-size: 14px; | ||
max-width: 260px; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
`; | ||
|
||
export const PodItemIconWrapper = styled.div` | ||
padding: 10px; | ||
border-radius: 1000px; | ||
background: ${({ bgColor }) => bgColor || palette.black85}; | ||
display: flex; | ||
`; | ||
|
||
export const PodItemStatsContainer = styled.div` | ||
display: flex; | ||
align-items: center; | ||
gap: 16px; | ||
p { | ||
font-weight: 500; | ||
font-size: 13px; | ||
} | ||
`; | ||
|
||
export const PodItemStats = styled.div` | ||
display: flex; | ||
align-items: center; | ||
gap: 8px; | ||
padding: 4px 6px; | ||
border-radius: 4px; | ||
background: ${palette.grey87}; | ||
`; | ||
|
||
export const PodItemContributorsCount = styled(Typography)` | ||
&& { | ||
color: ${palette.grey250}; | ||
font-size: 13px; | ||
font-weight: 500; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export enum PodView { | ||
ALL_PODS = 0, | ||
PODS_USER_IS_MEMBER_OF = 1, | ||
PODS_USER_IS_NOT_MEMBER_OF = 2, | ||
} |
Oops, something went wrong.