-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
306 additions
and
140 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import { Box, Flex } from "@chakra-ui/react"; | ||
import styled from "styled-components"; | ||
|
||
import Avatar from "./Avatar"; | ||
|
||
export interface IInfoCard { | ||
name: string; | ||
image: string; | ||
text: string; | ||
leftComponent?: React.ReactNode; | ||
rightComponent?: React.ReactNode; | ||
badge?: React.ReactNode; | ||
} | ||
|
||
export default function InfoCard({ | ||
image, | ||
text, | ||
name, | ||
leftComponent, | ||
rightComponent, | ||
badge, | ||
}: IInfoCard) { | ||
console.log(23, leftComponent, rightComponent); | ||
return ( | ||
<CardContainer> | ||
{leftComponent && <Box mr="16px">{leftComponent}</Box>} | ||
<Avatar image={image} size="md" /> | ||
<UserInfoContainer> | ||
<UserNameBadgeContainer> | ||
<span>{name}</span> | ||
{badge} | ||
</UserNameBadgeContainer> | ||
<Flex alignItems="center"> | ||
<CommentText>{text}</CommentText> | ||
</Flex> | ||
</UserInfoContainer> | ||
<RightComponentContainer>{rightComponent}</RightComponentContainer> | ||
</CardContainer> | ||
); | ||
} | ||
|
||
const Button = styled.button` | ||
display: inline-block; | ||
margin-left: 4px; | ||
padding: 0 4px; | ||
color: var(--gray-600); | ||
`; | ||
|
||
const CardContainer = styled.div` | ||
display: flex; | ||
align-items: center; | ||
padding: 12px 16px; | ||
border-bottom: var(--border-main); | ||
line-height: 24px; | ||
height: 72px; | ||
`; | ||
|
||
const UserInfoContainer = styled.div` | ||
margin-left: 12px; /* ml-3 */ | ||
`; | ||
|
||
const UserNameBadgeContainer = styled.div` | ||
display: flex; | ||
align-items: center; | ||
font-size: 14px; /* text-sm */ | ||
font-weight: 600; /* font-semibold */ | ||
> span:first-child { | ||
margin-right: 6px; | ||
} | ||
`; | ||
|
||
const CommentText = styled.span` | ||
display: -webkit-box; | ||
-webkit-box-orient: vertical; | ||
-webkit-line-clamp: 1; | ||
overflow: hidden; | ||
color: var(--gray-600); /* text-gray-4 */ | ||
font-size: 13px; | ||
`; | ||
|
||
const RightComponentContainer = styled.div` | ||
margin-left: auto; | ||
`; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import styled from "styled-components"; | ||
|
||
import InfoCard, { IInfoCard } from "../atoms/InfoCard"; | ||
|
||
interface IInfoCardColumn { | ||
placeCardArr: IInfoCard[]; | ||
} | ||
export default function InfoCardColumn({ placeCardArr }: IInfoCardColumn) { | ||
return ( | ||
<Layout> | ||
{placeCardArr.map((userCard, idx) => ( | ||
<InfoCard | ||
key={idx} | ||
image={userCard.image} | ||
text={userCard.text} | ||
name={userCard.name} | ||
leftComponent={userCard?.leftComponent} | ||
rightComponent={userCard?.rightComponent} | ||
/> | ||
))} | ||
</Layout> | ||
); | ||
} | ||
|
||
const Layout = styled.div` | ||
background-color: white; | ||
border-radius: var(--rounded-lg); | ||
`; |
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
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 was deleted.
Oops, something went wrong.
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,14 @@ | ||
import { IParticipation } from "../../types/models/studyTypes/studyDetails"; | ||
|
||
export const getStudyVoteCnt = (studyVoteData: IParticipation[], filterUid?: string) => { | ||
const temp = new Set(); | ||
|
||
studyVoteData?.forEach((par) => { | ||
if (par.place.brand === "자유 신청") return; | ||
par?.attendences.forEach((who) => { | ||
if (who?.user.uid === filterUid) return; | ||
temp.add(who.user.uid); | ||
}); | ||
}); | ||
return temp.size; | ||
}; |
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
2 changes: 1 addition & 1 deletion
2
modals/aboutHeader/pointSystemsModal/PointSystemsModalPoint.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
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
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
Oops, something went wrong.