Skip to content

Commit

Permalink
Merge branch 'feature/community' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
eun-hak committed May 27, 2024
2 parents 5a249d3 + 2cf3bf0 commit 729cf63
Show file tree
Hide file tree
Showing 88 changed files with 2,462 additions and 30 deletions.
7 changes: 7 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
domains: [
'bzbz-file-bucket.s3.ap-northeast-2.amazonaws.com',
'userimage.bucket.s3.ap-northeast-2.amazonaws.com',
'*'
]
},
reactStrictMode: true,
webpack: (config, { isServer }) => {
if (isServer) {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"react-query": "^3.39.3",
"react-toastify": "^10.0.5",
"remark-gfm": "^4.0.0",
"swiper": "^11.1.3",
"zustand": "^4.5.2"
},
"devDependencies": {
Expand Down
10 changes: 10 additions & 0 deletions public/community/back.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/community/check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/community/circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/community/colorCircle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/community/colorHeart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/community/deleteImg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/community/devider.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/community/heart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions public/community/picture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions public/community/reply.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions public/community/toBottom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions public/community/toNext.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions public/community/toTop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/community/userImg.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions public/community/viewCount.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions public/community/writePost.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/api/types/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface IUserInfo {
memberJob: string;
memberNickName: string;
memberSmsAgree: string;
imageUrl?: string;
}

export interface IWithdraw {
Expand Down
35 changes: 35 additions & 0 deletions src/components/community/Communityindex.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
'use client';
import dynamic from 'next/dynamic';
import React from 'react';
import { useCurrentTalkStore } from '@/store/currentTalk.store';
import InterestFilter from './interest/InterestFilter';
import PostsLayout from './shared/PostsLayout';
import MainContainer from '../shared/MainContainer';
import WritePostButton from './shared/WritePostButton';
import { useModalStore } from '@/store/modal.store';
import CreateModal from './shared/modal/CreateModal';

const CommunityHeader = dynamic(
() => import('@/components/community/shared/CommunityHeader'),
{ ssr: false }
);
const PositionFilter = dynamic(
() => import('@/components/community/career/PositionFilter'),
{ ssr: false }
);

const Communityindex = () => {
const { open } = useModalStore();
const { currentTalk } = useCurrentTalkStore();
return (
<MainContainer>
<CommunityHeader />
{currentTalk === 'career' ? <PositionFilter /> : <InterestFilter />}
<PostsLayout />
<WritePostButton />
{open ? <CreateModal /> : ''}
</MainContainer>
);
};

export default Communityindex;
44 changes: 44 additions & 0 deletions src/components/community/PostDetailIndex.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React from 'react';
import ToBackComunity from './shared/ToBackComunity';
import PostDetail from './shared/PostDetail';
import CommentsLayout from './comments/CommentsLayout';
import WriteCommentLayout from './comments/WriteCommentLayout';
import { useModalStore } from '@/store/modal.store';
import dynamic from 'next/dynamic';
import { useRouter } from 'next/router';
import { useQuery } from 'react-query';
import { getPostDetail } from './remote/post';
import ConfirmModal from './shared/modal/ConfirmModal';

const DeleteModal = dynamic(() => import('./shared/modal/DeleteModal'), { ssr: false });

const PostDetailIndex = () => {
const { open } = useModalStore();
const router = useRouter();
const { id } = router.query as { id: string };

const { data: postData } = useQuery(['post', id], () => getPostDetail(id), {
enabled: id != null
});

if (postData?.status == 'FAIL') {
return <ConfirmModal />;
}

return (
<div className="mx-4">
<div className="h-[60px]" />
<ToBackComunity />
<PostDetail postData={postData && postData} />
{/* 구분선 */}
<div className="w-full h-1 bg-gray-100" />
{/* 댓글자리 */}
<CommentsLayout />
{/* 댓글입력자리 */}
<WriteCommentLayout postId={id} />
{open ? <DeleteModal /> : ''}
</div>
);
};

export default PostDetailIndex;
Loading

0 comments on commit 729cf63

Please sign in to comment.