-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RELEASE] release 2.2 게스트 모드 추가 & 슬랙 메시지 (v2.2)
v2.2 배포 **[업데이트 내용]** - 게스트모드가 추가됩니다. (#9 #18 #23) - 기존 로그인을 해야 사용할 수 있던 서비스를 로그인 없이 게스트모드로 이용 가능합니다. - /main, /detail/[] 페이지를 이용 가능하며, 참여 목록은 블라인드 처리되어 볼 수 없습니다. - 주간발표 한정으로 슬랙 메시지를 보낼 수 있습니다. (#15) - 행사 카테고리를 주간발표로 하여 게시글을 올리면 prompt창이 뜨며, 선택 여부에 따라서 메시지를 보낼 수 있습니다.
- Loading branch information
Showing
44 changed files
with
585 additions
and
82 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
// rewrite | ||
async redirects() { | ||
return [ | ||
{ | ||
source: "/", | ||
destination: "/main", | ||
permanent: true, | ||
}, | ||
]; | ||
}, | ||
// async rewrites() { | ||
// return [ | ||
// { | ||
// source: "/main", | ||
// destination: "/", | ||
// }, | ||
// ]; | ||
// }, | ||
}; | ||
|
||
module.exports = nextConfig; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import AttendeeInfoContainer from "@/components/programDetail/attendee/AttendeeInfo.container"; | ||
import ProgramInfo from "@/components/programDetail/program/ProgramInfo"; | ||
import UserAttendModalContainer from "@/components/programDetail/userAttendModal/UserAttendModal.container"; | ||
|
||
interface ProgramDetailPageProps { | ||
params: { | ||
programId: string; | ||
}; | ||
} | ||
|
||
const ProgramDetailPage = ({ params }: ProgramDetailPageProps) => { | ||
const { programId } = params; | ||
|
||
return ( | ||
<div className="mb-16 space-y-16"> | ||
<ProgramInfo programId={+programId} isLoggedIn={false} /> | ||
<AttendeeInfoContainer programId={+programId} isLoggedIn={false} /> | ||
<UserAttendModalContainer programId={+programId} isLoggedIn={false} /> | ||
</div> | ||
); | ||
}; | ||
export default ProgramDetailPage; |
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,19 @@ | ||
"use client"; | ||
|
||
import ErrorFallback from "@/components/common/ErrorFallback"; | ||
|
||
const DetailPageError = () => { | ||
const error = { | ||
message: "행사 정보를 불러오는 중에 오류가 발생했습니다.", | ||
}; | ||
|
||
return ( | ||
<ErrorFallback | ||
error={error} | ||
resetErrorBoundary={() => { | ||
window.location.reload(); | ||
}} | ||
/> | ||
); | ||
}; | ||
export default DetailPageError; |
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,4 @@ | ||
import LoadingSpinner from "@/components/common/LoadingSpinner"; | ||
|
||
const DetailLoading = () => <LoadingSpinner />; | ||
export default DetailLoading; |
7 changes: 5 additions & 2 deletions
7
FE/src/app/(private)/(program)/layout.tsx → FE/src/app/(guest)/guest/layout.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import LoadingSpinner from "@/components/common/LoadingSpinner"; | ||
|
||
const MainLoading = () => { | ||
return <LoadingSpinner />; | ||
}; | ||
export default MainLoading; |
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,98 @@ | ||
// TODO: 서버 컴포넌트로 변경하기 | ||
"use client"; | ||
|
||
import { useSearchParams } from "next/navigation"; | ||
import { Suspense, useEffect, useState } from "react"; | ||
import { ErrorBoundary } from "react-error-boundary"; | ||
import ErrorFallback from "@/components/common/ErrorFallback"; | ||
import Tab from "@/components/common/tabs/Tab"; | ||
import TextTab from "@/components/common/tabs/TextTab"; | ||
import ProgramList from "@/components/main/ProgramList"; | ||
import ProgramListLoader from "@/components/main/ProgramList.loader"; | ||
import TeamBuildingDropup from "@/components/main/TeamBuildingDropup"; | ||
import MAIN from "@/constants/MAIN"; | ||
import PROGRAM from "@/constants/PROGRAM"; | ||
import { ProgramCategoryWithAll, ProgramStatus } from "@/types/program"; | ||
|
||
const MainPage = () => { | ||
const searchParams = useSearchParams(); | ||
|
||
// TODO: Hook으로 변경하기 | ||
const [queryValue, setQueryValue] = useState(MAIN.DEFAULT_QUERY); | ||
|
||
// TODO: useEffect를 Hook으로 변경하기 | ||
useEffect(() => { | ||
setQueryValue({ | ||
...MAIN.DEFAULT_QUERY, | ||
category: | ||
(searchParams.get("category") as ProgramCategoryWithAll) ?? "all", | ||
status: (searchParams.get("status") as ProgramStatus) ?? "active", | ||
page: searchParams.get("page") ?? "1", | ||
}); | ||
}, [searchParams]); | ||
|
||
useEffect(() => { | ||
window.history.replaceState( | ||
{}, | ||
"", | ||
`?category=${queryValue.category}&status=${queryValue.status}&page=${queryValue.page}`, | ||
); | ||
}, [queryValue]); | ||
|
||
const handleSetCategory = (category: ProgramCategoryWithAll) => { | ||
setQueryValue({ | ||
...queryValue, | ||
category, | ||
page: "1", | ||
}); | ||
}; | ||
|
||
const handleSetStatus = (status: ProgramStatus) => { | ||
setQueryValue({ | ||
...queryValue, | ||
status, | ||
page: "1", | ||
}); | ||
}; | ||
|
||
const handleSetPage = (page: number) => { | ||
setQueryValue({ | ||
...queryValue, | ||
page: page.toString(), | ||
}); | ||
}; | ||
|
||
// TODO: 합성 컴포넌트! | ||
return ( | ||
<div className="relative space-y-8"> | ||
<Tab<ProgramCategoryWithAll> | ||
options={Object.values(PROGRAM.CATEGORY_TAB_WITH_ALL)} | ||
selected={queryValue.category} | ||
onItemClick={(v) => handleSetCategory(v)} | ||
size="lg" | ||
baseColor="white" | ||
pointColor="navy" | ||
align="line" | ||
/> | ||
<TextTab<ProgramStatus> | ||
options={Object.values(PROGRAM.STATUS_TAB)} | ||
selected={queryValue.status} | ||
onClick={(v) => handleSetStatus(v)} | ||
/> | ||
<ErrorBoundary FallbackComponent={ErrorFallback}> | ||
<Suspense fallback={<ProgramListLoader />}> | ||
<ProgramList | ||
category={queryValue.category} | ||
programStatus={queryValue.status} | ||
page={+queryValue.page} | ||
setPage={handleSetPage} | ||
isLoggedIn={false} | ||
/> | ||
</Suspense> | ||
</ErrorBoundary> | ||
<TeamBuildingDropup /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default MainPage; |
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.