- {ProjectCategoryDescription(selectedCategory)}
-
);
case 'ERROR':
@@ -36,19 +32,18 @@ export function ProjectList({ selectedCategory, state }: ProjectListProp) {
const { data: projectList } = state;
const listLength = projectList.length;
return (
-
+
0}>
-
- {ProjectCategoryDescription(selectedCategory)}
- {ProjectListCount(listLength)}
-
- {ProjectCardList(projectList)}
+
+
+
+
+
- {ProjectCategoryDescription(selectedCategory)}
+
-
);
}
@@ -58,37 +53,6 @@ export function ProjectList({ selectedCategory, state }: ProjectListProp) {
);
}
-function ProjectCardList(list: ProjectType[]) {
- const { data, isNextPage, ref } = useInfiniteScroll(list);
-
- return (
- <>
-
- {data.map((project, index) => (
-
- ))}
-
- {isNextPage && (
-
- )}
- >
- );
-}
-
-function ProjectListCount(count: number) {
- return
{count}개의 프로젝트
;
-}
-
-function ProjectCategoryDescription(category: ProjectCategoryType) {
- const description = projectCategoryDescription[category];
- if (description === '') return
;
- return
{description}
;
-}
-
function ProjectListSkeletonUI() {
const array = new Array(9).fill(undefined);
return (
diff --git a/src/views/ProjectPage/components/project/ProjectListCount/index.tsx b/src/views/ProjectPage/components/project/ProjectListCount/index.tsx
new file mode 100644
index 00000000..95385416
--- /dev/null
+++ b/src/views/ProjectPage/components/project/ProjectListCount/index.tsx
@@ -0,0 +1,16 @@
+import { useMediaQuery } from 'react-responsive';
+import * as S from './style';
+
+interface ProjectListCountProps {
+ count: number;
+}
+
+export default function ProjectListCount({ count }: ProjectListCountProps) {
+ const isTablet = useMediaQuery({ query: '(min-width: 900px) and (max-width: 1279px)' });
+
+ return (
+
+ {count}개{!isTablet && '의 프로젝트'}
+
+ );
+}
diff --git a/src/views/ProjectPage/components/project/ProjectListCount/style.ts b/src/views/ProjectPage/components/project/ProjectListCount/style.ts
new file mode 100644
index 00000000..62c8b632
--- /dev/null
+++ b/src/views/ProjectPage/components/project/ProjectListCount/style.ts
@@ -0,0 +1,25 @@
+import styled from '@emotion/styled';
+import { colors } from '@sopt-makers/colors';
+
+export const Count = styled.div`
+ color: ${colors.gray100};
+
+ /* Body/1_Medium_18 */
+ font-family: SUIT;
+ font-size: 18px;
+ font-style: normal;
+ font-weight: 500;
+ line-height: 165%; /* 29.7px */
+ letter-spacing: -0.27px;
+
+ /* 모바일 뷰 */
+ @media (max-width: 899px) {
+ /* Body/3_Medium_14 */
+ font-family: SUIT;
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 500;
+ line-height: 165%; /* 23.1px */
+ letter-spacing: -0.21px;
+ }
+`;
diff --git a/src/views/ProjectPage/components/project/index.ts b/src/views/ProjectPage/components/project/index.ts
deleted file mode 100644
index b6364bc9..00000000
--- a/src/views/ProjectPage/components/project/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './ProjectCard';
-export * from './ProjectEnrollSection';
-export * from './ProjectList';
diff --git a/src/views/ProjectPage/components/project/project-card.module.scss b/src/views/ProjectPage/components/project/project-card.module.scss
deleted file mode 100644
index b45ecbbf..00000000
--- a/src/views/ProjectPage/components/project/project-card.module.scss
+++ /dev/null
@@ -1,142 +0,0 @@
-@import '@src/lib/styles/mixins';
-
-.item {
- display: flex;
- flex-direction: column;
- align-items: center;
-
- border: 1px solid #353535;
- border-radius: 10px;
- cursor: pointer;
-
- @include desktop {
- width: 380px;
- height: 468px;
- }
-
- @include mobile-tablet {
- width: 328px;
- height: 402px;
- }
-
- .image-wrapper {
- display: flex;
- justify-content: center;
- align-items: center;
- position: relative;
-
- background-color: #141414;
- border-radius: 5px;
- overflow: hidden;
-
- @include desktop {
- width: 368px;
- height: 270px;
- margin: 7px;
- padding-bottom: 5px;
-
- img {
- border-radius: 10px;
- }
- }
-
- @include mobile-tablet {
- width: 316px;
- height: 235px;
- margin: 5px;
- padding-bottom: 5px;
-
- img {
- border-radius: 10px;
- }
- }
- }
-
- .content {
- width: 90%;
- height: 268px;
-
- display: flex;
- flex-direction: column;
- justify-content: space-around;
-
- .types {
- display: flex;
- justify-content: flex-start;
-
- & > div {
- display: flex;
- justify-content: center;
- align-items: center;
-
- width: 60px;
- height: 32px;
- padding: 10px 10px;
-
- font-size: 18px;
-
- border: 1px solid rgba(255, 255, 255, 0.3);
- border-radius: 10px;
- color: #cccccc;
-
- margin-right: 8px;
- }
- }
-
- .text {
- width: 348px;
- height: 52px;
-
- @include mobile-tablet {
- width: 288px;
- height: 48px;
- }
-
- /* title */
- & > h5 {
- font-style: normal;
- font-size: 26px;
- font-weight: 700;
-
- @include mobile-tablet {
- font-style: normal;
- font-size: 20px;
- font-weight: 700;
- }
- }
-
- /* summary */
- & > p {
- font-style: normal;
- font-size: 18px;
- line-height: 26px;
- margin-top: 10px;
- color: #8e8e8e;
-
- @include mobile-tablet {
- font-style: normal;
- font-size: 15px;
- line-height: 24px;
- }
- }
- }
-
- .links {
- display: flex;
- height: 50px;
-
- .icon-wrapper {
- display: flex;
- justify-content: center;
- align-items: center;
-
- width: 50px;
- height: 50px;
-
- background: #242424;
- border-radius: 5px;
- margin-right: 10px;
- }
- }
- }
-}
diff --git a/src/views/ProjectPage/components/project/project-enroll.module.scss b/src/views/ProjectPage/components/project/project-enroll.module.scss
deleted file mode 100644
index 95e20281..00000000
--- a/src/views/ProjectPage/components/project/project-enroll.module.scss
+++ /dev/null
@@ -1,53 +0,0 @@
-@import '@src/lib/styles/mixins';
-
-.enroll {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- color: rgba(255, 255, 255, 0.5);
- font-style: normal;
-
- .content {
- width: 60%;
- display: flex;
- justify-content: center;
- align-items: center;
-
- padding-top: 5px;
- cursor: pointer;
- }
-
- @include desktop {
- height: 402px;
- p {
- font-size: 22px;
- font-weight: 500;
- color: rgba(255, 255, 255, 0.5);
- padding-bottom: 10px;
- }
-
- span {
- font-size: 22px;
- font-weight: 700;
- color: rgba(255, 255, 255, 0.5);
- }
- }
-
- @include mobile-tablet {
- height: 402px;
-
- p {
- font-size: 15px;
- font-weight: 500;
- color: rgba(255, 255, 255, 0.5);
- padding-bottom: 10px;
- }
-
- span {
- font-size: 15px;
- font-weight: 700;
- color: rgba(255, 255, 255, 0.5);
- }
- }
-}
diff --git a/src/views/ProjectPage/components/project/style.ts b/src/views/ProjectPage/components/project/style.ts
new file mode 100644
index 00000000..49967ca4
--- /dev/null
+++ b/src/views/ProjectPage/components/project/style.ts
@@ -0,0 +1,14 @@
+import styled from '@emotion/styled';
+import { ProjectCategoryType } from '@src/lib/types/project';
+
+export const ProjectListHeader = styled.div<{ selectedCategory: ProjectCategoryType }>`
+ display: flex;
+ justify-content: ${({ selectedCategory }) =>
+ selectedCategory === ProjectCategoryType.ALL ? 'end' : 'space-between'};
+
+ /* 모바일 뷰 */
+ @media (max-width: 899px) {
+ flex-direction: column;
+ gap: 20px;
+ }
+`;