Skip to content

Commit

Permalink
resolve: resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
June1010 committed Dec 17, 2022
2 parents 7e80b82 + 8c303ae commit 2c4b2f7
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 32 deletions.
36 changes: 24 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
<div align="center">

# ๐Ÿƒโ€โ™‚๏ธRunWithMe๐Ÿƒโ€โ™‚๏ธ
๋‚˜๋งŒ์˜ ์ฝ”์Šค๋กœ ๋‹ฌ๋ ค๋ณด๊ณ  ์‹ถ์œผ์‹ ๊ฐ€์š”?

ํ˜ผ์ž ๋›ฐ๋Š”๊ฒŒ ์ง€๋ฃจํ•˜์‹ ๊ฐ€์š”?

**๋‚˜๋งŒ์˜ ์ฝ”์Šค**๋กœ **ํ•จ๊ป˜** ๋‹ฌ๋ฆฌ๋Š” ๋Ÿฌ๋‹ ์ปค๋ฎค๋‹ˆํ‹ฐ, <a href="https://runwithme.co.kr/">**RunWithMe**</a>๋ฅผ ์‹œ์ž‘ํ•ด๋ณด์„ธ์š”!

## ๐Ÿ›  ๊ธฐ์ˆ  ์Šคํƒ

## RunWithMe โ‰๏ธ
> ๋‚˜๋งŒ์˜ ์ฝ”์Šค๋กœ ๋‹ฌ๋ ค๋ณด๊ณ  ์‹ถ์€์‹ ๊ฐ€์š”?
>
>
> ํ˜ผ์ž ๋›ฐ๋Š”๊ฒŒ ์ง€๋ฃจํ•˜์‹ ๊ฐ€์š”?
>
> **๋‚˜๋งŒ์˜ ์ฝ”์Šค**๋กœ **ํ•จ๊ป˜** ๋‹ฌ๋ฆฌ๋Š” ๋Ÿฌ๋‹ ์ปค๋ฎค๋‹ˆํ‹ฐ, **RunWithMe**๋ฅผ ์‹œ์ž‘ํ•ด๋ณด์„ธ์š”!
>
<img width="700" alt="แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2022-12-15 แ„‹แ…ฉแ„’แ…ฎ 5 59 35" src="https://user-images.githubusercontent.com/97938489/207816864-df375aba-56db-4074-9592-97e0b5ea4ea2.png">

## ๐Ÿ™‹โ€โ™‚๏ธํ–‰๋ณตํšŒ๋กœ ํŒ€์›๋“ค์„ ์†Œ๊ฐœํ•ฉ๋‹ˆ๋‹ค

<table>
<tr>
<td align="center"><img src="https://github.com/pushedrumex.png" width="160"></td>
<td align="center"><img src="https://github.com/catensia.png" width="160"></td>
<td align="center"><img src="https://github.com/June1010.png" width="160"></td>
<td align="center"><img src="https://github.com/gchoi96.png" width="160"></td>
<td align="center"><img src="https://user-images.githubusercontent.com/53655119/207808860-fb8be375-c7fc-41ec-9e80-55e25793156c.png" width="160"></td>
<td align="center"><img src="https://user-images.githubusercontent.com/53655119/207808869-93dbd80a-e9be-49bb-b4b8-89945eb7bf83.png" width="160"></td>
<td align="center"><img src="https://user-images.githubusercontent.com/53655119/207808873-9de904f4-486a-4865-b2e1-253a9b5485ed.png" width="160"></td>
<td align="center"><img src="https://user-images.githubusercontent.com/53655119/207808877-eb84c724-6be4-4365-a302-a55b3ec99389.png" width="160"></td>
</tr>
<tr>
<td align="center">J034_๊น€๋ฏผ์ •</td>
Expand All @@ -33,3 +35,13 @@

</tr>
</table>

## ๐Ÿš€ ํ”„๋กœ์ ํŠธ๋ฅผ ์†Œ๊ฐœํ•ฉ๋‹ˆ๋‹ค

## โš™๏ธ ์ฃผ์š” ๊ธฐ๋Šฅ๋“ค์„ ์†Œ๊ฐœํ•ฉ๋‹ˆ๋‹ค

## ๐Ÿ•น ์•„ํ‚คํ…์ฒ˜

<img width="630" alt="แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2022-12-15 แ„‹แ…ฉแ„’แ…ฎ 4 01 06" src="https://user-images.githubusercontent.com/97938489/207812760-d0088060-f825-427a-80d4-3bbceecc53c2.png">

</div>
5 changes: 3 additions & 2 deletions client/src/components/Card/RecruitCard/RecruitCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import { timeDifference } from "#utils/cardUtils";

interface RecruitCardProps {
data: Recruit;
userIdVisible?: boolean;
}

const RecruitCard = ({ data }: RecruitCardProps) => {
const RecruitCard = ({ data, userIdVisible = true }: RecruitCardProps) => {
return (
<Card to={`/recruit/${data.id}`} path={data.course.path}>
<SummaryHead>
Expand All @@ -30,7 +31,7 @@ const RecruitCard = ({ data }: RecruitCardProps) => {
<img width="14" height="14" alt="CLOCK_ICON" src={CLOCK_ICON} />
<span>{timeDifference(data.startTime)}</span>
</div>
<UserIdLabel>{data.userId}</UserIdLabel>
<UserIdLabel>{userIdVisible && data.userId}</UserIdLabel>
</SummaryBody>
</Card>
);
Expand Down
7 changes: 6 additions & 1 deletion client/src/components/CardList/CourseList/CorseList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ const CorseList = ({ distance, query, authorFilter, titleFilter }: CourseListPro
const { data, fetchNextPage, hasNextPage } = useCoursesQuery({ distance, query, authorFilter, titleFilter });

return (
<InfiniteScroll loadMore={() => fetchNextPage()} hasMore={hasNextPage} loader={<CardLoader />}>
<InfiniteScroll
loadMore={() => fetchNextPage()}
hasMore={hasNextPage}
loader={<CardLoader />}
useWindow={false}
>
<CardWrapper>
{data?.pages.map((page, pageIdx) =>
page?.map((card, idx) => <CourseCard data={card} key={`${pageIdx}_${idx}`} />),
Expand Down
1 change: 1 addition & 0 deletions client/src/components/CardList/RecruitList/RecruitList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const RecruitList = (props: RecruitListProps) => {
<CardLoader />
</div>
}
useWindow={false}
>
<CardWrapper>
{data?.pages.map((page, pageIdx) =>
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Layout/Layout.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export const Container = styled.div`
> div:last-child {
background-color: ${COLOR.WHITE};
position: relative;
height: 100vh;
overflow-y: scroll;
}
@media screen and (min-width: 480px) {
${flexRowCenter};
Expand All @@ -38,8 +40,6 @@ export const Container = styled.div`
box-shadow: 2px 0 16px rgba(0, 0, 0, 0.25), -2px 0 16px rgba(0, 0, 0, 0.25);
width: 390px;
min-width: 390px;
height: 100%;
overflow-y: scroll;
-ms-overflow-style: none;
scrollbar-width: none;
::-webkit-scrollbar {
Expand Down
6 changes: 5 additions & 1 deletion client/src/hooks/queries/useCoursesQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ const useCoursesQuery = ({ distance, query, authorFilter, titleFilter }: CourseL
["courses", distance?.min, distance?.max, authorFilter, titleFilter, query],
({ pageParam = 1 }) => get("/course", courseQueryParams(pageParam)).then((res) => res.data),
{
getNextPageParam: (lastPage, allPages) => (lastPage ? lastPage?.length > 0 && allPages.length + 1 : 1),
getNextPageParam: (lastPage, allPages) => {
if (!lastPage) return 1;
if (lastPage?.length > 0) return allPages.length + 1;
else return undefined;
},
suspense: true,
},
);
Expand Down
14 changes: 10 additions & 4 deletions client/src/hooks/queries/useRecruitsQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,24 @@ const useRecruitsQuery = ({ distance, query, availFilter, authorFilter, titleFil
param.maxLen = (distance.max * 1000).toString();
param.minLen = (distance.min * 1000).toString();
}
if (time) {
param.time = time.max.toString();

if (time?.max) {
param.hour = time.max.toString();
}

param.page = page;
return param;
};

return useInfiniteQuery(
["recruits", distance?.min, distance?.max, authorFilter, titleFilter, query],
["recruits", distance?.min, distance?.max, authorFilter, titleFilter, query, time],
({ pageParam = 1 }) => get("/recruit", recruitQueryParams(pageParam)).then((res) => res.data),
{
getNextPageParam: (lastPage, allPages) => (lastPage ? lastPage?.length > 0 && allPages.length + 1 : 1),
getNextPageParam: (lastPage, allPages) => {
if (!lastPage) return 1;
if (lastPage?.length > 0) return allPages.length + 1;
else return undefined;
},
suspense: true,
},
);
Expand Down
10 changes: 6 additions & 4 deletions client/src/pages/Courses/Courses.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, FormEventHandler, Suspense } from "react";
import React, { useState, Suspense, ChangeEvent } from "react";
import Header from "#components/Header/Header";
import SearchBar from "#components/SearchBar/SearchBar";
import FilterBar from "#components/FilterBar/FilterBar";
Expand All @@ -11,16 +11,17 @@ import { LOCATION_ICON } from "#assets/icons";
import PlusButton from "#components/PlusButton/PlusButton";
import CourseList from "#components/CardList/CourseList/CorseList";
import CardListLoader from "#components/CardList/CardList.loader";
import { debounce } from "#utils/timerUtils";

const Courses = () => {
const [currentDistanceFilter, setCurrentDistanceFilter] = useFilter({ text: "3-5KM", min: 3, max: 5 });
const [titleFilter, toggleTitleFilter] = useOnOffFilter(false);
const [authorFilter, toggleAuthorFilter] = useOnOffFilter(false);
const [searchContent, setSearchContent] = useState("");

const handleSearchContentChange: FormEventHandler<HTMLInputElement> = (e) => {
setSearchContent(e.currentTarget.value);
};
const handleSearchContentChange = debounce((e: ChangeEvent<HTMLInputElement>) => {
setSearchContent(e.target.value);
}, 200);

return (
<>
Expand All @@ -45,6 +46,7 @@ const Courses = () => {
filterIcon={LOCATION_ICON}
filterState={currentDistanceFilter}
filterOptions={[
{ text: "5KM ์ด์ƒ", min: 5, max: Number.MAX_SAFE_INTEGER },
{ text: "3-5KM", min: 3, max: 5 },
{ text: "1-3KM", min: 1, max: 3 },
{ text: "1KM ์ด๋‚ด", min: 0, max: 1 },
Expand Down
4 changes: 3 additions & 1 deletion client/src/pages/MyPage/MyPageRecruits.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ const MyPageRecruits = ({ MyPageOption }: MyPageProps) => {
if (!pastRecruitsToggled) filteredRecruit = filterPastRecruits(filteredRecruit);
if (myRecruitsToggled) filteredRecruit = filterMyRecruits(filteredRecruit);

return filteredRecruit.map((r: Recruit, idx: number) => <RecruitCard data={r} key={idx} />);
return filteredRecruit.map((r: Recruit, idx: number) => (
<RecruitCard data={r} key={idx} userIdVisible={false} />
));
};

return (
Expand Down
11 changes: 7 additions & 4 deletions client/src/pages/Recruits/Recruits.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Suspense, useState } from "react";
import React, { ChangeEvent, Suspense, useState } from "react";
import Header from "#components/Header/Header";
import SearchBar from "#components/SearchBar/SearchBar";
import FilterBar from "#components/FilterBar/FilterBar";
Expand All @@ -11,6 +11,7 @@ import { LOCATION_ICON, CLOCK_ICON } from "#assets/icons";
import PlusButton from "#components/PlusButton/PlusButton";
import RecruitList from "#components/CardList/RecruitList/RecruitList";
import CardListLoader from "#components/CardList/CardList.loader";
import { debounce } from "#utils/timerUtils";

const Recruits = () => {
const [currentDistanceFilter, setCurrentDistanceFilter] = useFilter({ text: "3-5KM", min: 3, max: 5 });
Expand All @@ -20,9 +21,9 @@ const Recruits = () => {
const [availFilter, toggleAvailFilter] = useOnOffFilter(false);
const [searchContent, setSearchContent] = useState("");

const handleSearchContentChange = (e: React.FormEvent<HTMLInputElement>) => {
setSearchContent(e.currentTarget.value);
};
const handleSearchContentChange = debounce((e: ChangeEvent<HTMLInputElement>) => {
setSearchContent(e.target.value);
}, 200);

return (
<>
Expand Down Expand Up @@ -52,6 +53,7 @@ const Recruits = () => {
filterIcon={LOCATION_ICON}
filterState={currentDistanceFilter}
filterOptions={[
{ text: "5KM ์ด์ƒ", min: 5, max: Number.MAX_SAFE_INTEGER },
{ text: "3-5KM", min: 3, max: 5 },
{ text: "1-3KM", min: 1, max: 3 },
{ text: "1KM ์ด๋‚ด", min: 0, max: 1 },
Expand All @@ -63,6 +65,7 @@ const Recruits = () => {
filterIcon={CLOCK_ICON}
filterState={currentTimeFilter}
filterOptions={[
{ text: "์ƒ๊ด€ ์—†์Œ", min: 0, max: 0 },
{ text: "5์‹œ๊ฐ„ ์ด๋‚ด", min: 0, max: 5 },
{ text: "3์‹œ๊ฐ„ ์ด๋‚ด", min: 0, max: 3 },
{ text: "1์‹œ๊ฐ„ ์ด๋‚ด", min: 0, max: 1 },
Expand Down
1 change: 0 additions & 1 deletion noti-server/src/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export class AppService {

// 30๋ถ„ ์ „ ์‹œ์ž‘ ์•Œ๋ฆผ
createRecruitMessage(body: any) {
console.log(body);
const { recruitId, author, title, hDong, startTime, pathLength } = body;
const result = {};

Expand Down
1 change: 1 addition & 0 deletions server/src/common/repositories/course.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class CourseRepository extends Repository<Course> {
])
.offset((page - 1) * pageSize)
.limit(pageSize)
.orderBy("course.id", "DESC")
.getMany();
}
async findOneById(id: number): Promise<Course> {
Expand Down
2 changes: 2 additions & 0 deletions server/src/common/repositories/recruit.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class RecruitRepository extends Repository<Recruit> {
"h_dong.name",
])
.where("recruit.id = :recruitId", { recruitId })
.orderBy("recruit.id", "DESC")
.getRawOne();
}

Expand Down Expand Up @@ -94,6 +95,7 @@ export class RecruitRepository extends Repository<Recruit> {
.groupBy("recruit.id")
.offset((page - 1) * pageSize)
.limit(pageSize)
.orderBy("recruit.id", "DESC")
.getRawMany();
}

Expand Down

0 comments on commit 2c4b2f7

Please sign in to comment.