-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SP2] 프로젝트 탭 피드 디자인 변경 #245
Changes from all commits
741df39
e4f983a
c5a790f
c6c225e
c2a2b21
95f7d25
82e0092
ca74230
e783beb
2fea0ca
c426d38
ed08189
b2e1936
c266623
c9bac33
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export * from './common/EmptyContent'; | ||
export * from './common/OvalSpinner'; | ||
export * from './project'; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { track } from '@amplitude/analytics-browser'; | ||
import { useIsMobile } from '@src/hooks/useDevice'; | ||
import { ProjectType } from '@src/lib/types/project'; | ||
import * as S from './style'; | ||
|
||
export default function ProjectCard({ project }: { project: ProjectType }) { | ||
const isMobile = useIsMobile('899px'); | ||
|
||
return ( | ||
<S.ProjectCard href={`/project/${project.id}`} onClick={() => track('click_project_detail')}> | ||
{!isMobile && ( | ||
<S.ProjectThumbnail | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 모바일일 때랑 모바일이 아닐 때랑 구조가 다른 이유는 무엇인가요..?? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 모바일일 때는 프로젝트 목록이 리스트 형태로 바뀌는데 썸네일이 제목같은 텍스트들과 같은 라인에 있어서요! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 그렇군요.!! 그렇담 조아요~~~~~ 나중에 모바일과 데탑에서 달라지는 요소가 추가되면, grid-temlate-area 등도 사용해보면 좋을 것 가타요!! ((이미 알고 있으실 것 같슴당)) |
||
src={project.thumbnailImage ?? project.logoImage} | ||
alt="프로젝트 썸네일" | ||
width={324} | ||
height={192} | ||
loading="lazy" | ||
placeholder="blur" | ||
blurDataURL="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mPU0zOtBwACNQES9P3nGQAAAABJRU5ErkJggg==" | ||
/> | ||
)} | ||
<S.ProjectContent> | ||
<S.ProjectHeader> | ||
{isMobile && ( | ||
<S.ProjectThumbnail | ||
src={project.logoImage} | ||
alt="프로젝트 로고" | ||
width={40} | ||
height={40} | ||
loading="lazy" | ||
placeholder="blur" | ||
blurDataURL="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mPU0zOtBwACNQES9P3nGQAAAABJRU5ErkJggg==" | ||
/> | ||
)} | ||
<S.ProjectText> | ||
<S.ProjectTitle>{project.name}</S.ProjectTitle> | ||
{project.serviceType.map((type, index) => ( | ||
<S.ProjectType key={type}> | ||
<span>{type}</span> | ||
{project.serviceType.length - 1 !== index && <S.Divider>∙</S.Divider>} | ||
</S.ProjectType> | ||
))} | ||
</S.ProjectText> | ||
</S.ProjectHeader> | ||
<S.ProjectSummary>{project.summary}</S.ProjectSummary> | ||
</S.ProjectContent> | ||
{/* TODO: 서비스 이용 가능 및 창업 정보와 멤버 정보 추가 필요 */} | ||
</S.ProjectCard> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요거 array 형태라서 s 붙는게 좋아보이는데 s가 없어진 이유가 무엇인가요..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API 리스펀스랑 맞추는 게 좋을 거 같아서 없앴습니다! 그리고 serviceType이 프로젝트 페이지와 프로젝트 디테일 페이지에서 사용되고 있는데 프로젝트 페이지에서는 리스펀스 값을 받을 때 serviceTypes로 받아주지 않아서 여태까지 웹인지 앱인지가 안나오고 있었어요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오ㅓ 그런 에러가 있었군요.......... 발견해주셔서 정말 감사해여....