Skip to content
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

수정사항 반영 (issue #746) #747

Merged
merged 22 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
cd69616
refactor: 커스텀 뮤테이션 인자 변경
brgndyy Oct 8, 2024
6d6a468
Merge branch 'dev' of https://github.com/woowacourse-teams/2024-devel…
brgndyy Oct 10, 2024
7ada97b
Merge branch 'dev' of https://github.com/woowacourse-teams/2024-devel…
brgndyy Oct 11, 2024
2edb8ea
Merge branch 'dev' of https://github.com/woowacourse-teams/2024-devel…
brgndyy Oct 11, 2024
084c17a
remove: 파일 삭제
brgndyy Oct 11, 2024
72d9638
Merge branch 'dev' of https://github.com/woowacourse-teams/2024-devel…
brgndyy Oct 11, 2024
b98620e
Merge branch 'dev' of https://github.com/woowacourse-teams/2024-devel…
brgndyy Oct 15, 2024
195e287
Merge branch 'dev' of https://github.com/woowacourse-teams/2024-devel…
brgndyy Oct 17, 2024
9b7665e
Merge branch 'dev' of https://github.com/woowacourse-teams/2024-devel…
brgndyy Oct 18, 2024
414c7ee
Merge branch 'dev' of https://github.com/woowacourse-teams/2024-devel…
brgndyy Oct 22, 2024
23e6f2e
Merge branch 'dev' of https://github.com/woowacourse-teams/2024-devel…
brgndyy Oct 23, 2024
19c8b3d
Merge branch 'dev' of https://github.com/woowacourse-teams/2024-devel…
brgndyy Oct 23, 2024
259d238
Merge branch 'dev' of https://github.com/woowacourse-teams/2024-devel…
brgndyy Oct 24, 2024
a56070f
Merge branch 'dev' of https://github.com/woowacourse-teams/2024-devel…
brgndyy Oct 24, 2024
e34c503
Merge branch 'dev' of https://github.com/woowacourse-teams/2024-devel…
brgndyy Oct 24, 2024
0e1eb5e
refactor: 수정사항 반영
brgndyy Oct 24, 2024
aac3ca5
refactor: privateRotue
brgndyy Oct 24, 2024
f87947c
refacotr: a링크로 대체
brgndyy Oct 24, 2024
ff9ca9f
fix: 링크 삭제
brgndyy Oct 24, 2024
44cb71a
design: 수정사항 반영
brgndyy Oct 24, 2024
9f1d035
design: 수정사항 반영
brgndyy Oct 24, 2024
e415b43
Merge branch 'dev' into feat/#746
brgndyy Oct 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,19 @@ export const ImageCommentWrapper = styled.div`
export const TextWrapper = styled.div`
display: flex;
flex-direction: column;
width: 50rem;

${media.medium`
width:18rem
`}
`;

export const CommentText = styled.span`
${(props) => props.theme.font.body}
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 80%;
`;

export const SubText = styled.span`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { formatDateString } from '@/utils/formatDateString';
interface DiscussionItemProps {
id: number;
mission: string;
hashTags: HashTag[];
hashTags?: HashTag[];
title: string;
imageUrl: string;
commentCount: number;
Expand All @@ -27,9 +27,10 @@ export default function DiscussionItem({
<S.TextWrapper>
<S.HashTagWrapper>
{mission && <S.HashTag $isTitle>{mission}</S.HashTag>}
{hashTags.map((hashTag) => {
return <S.HashTag key={hashTag.id}>{hashTag.name}</S.HashTag>;
})}
{hashTags &&
hashTags.map((hashTag) => {
return <S.HashTag key={hashTag.id}>{hashTag.name}</S.HashTag>;
})}
</S.HashTagWrapper>
<S.CommentText>{title}</S.CommentText>
<S.SubText>{formatDateString(createdAt)}</S.SubText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ export default function DashBoardDiscussionList() {

return (
<>
{!discussionList.length ? (
{!discussionList?.length ? (
<NoContent type="dashboardDiscussion" />
) : (
<S.Container>
{discussionList.map((discussion) => {
{discussionList?.map((discussion) => {
return (
<DiscussionItem
key={discussion.id}
id={discussion.id}
hashTags={discussion.hashTags}
hashTags={discussion?.hashTags || []}
title={discussion.title}
mission={discussion.mission}
imageUrl={discussion.member?.imageUrl}
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/components/common/Error/ErrorLogo.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import * as S from '@/components/Header/Header.styled';
import LogoImg from '@/assets/images/logo.svg';

export default function ErrorLogo() {
return (
<>
<S.Container>
<S.Wrapper>
<S.LeftPart>
<S.Logo>🚀 DEVEL UP</S.Logo>
<S.Logo>
<LogoImg width={30} height={30} /> DEVEL UP
</S.Logo>
</S.LeftPart>
</S.Wrapper>
</S.Container>
Expand Down
18 changes: 9 additions & 9 deletions frontend/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,17 +284,17 @@
basename: ROUTES.main,
});

// async function enableMocking() {
// if (process.env.NODE_ENV !== 'development') {
// return;
// }
async function enableMocking() {

Check failure on line 287 in frontend/src/index.tsx

View workflow job for this annotation

GitHub Actions / FE_CI

'enableMocking' is defined but never used
if (process.env.NODE_ENV !== 'development') {
return;
}

// const { worker } = await import('./mocks/browser');
const { worker } = await import('./mocks/browser');

// // `worker.start()` returns a Promise that resolves
// // once the Service Worker is up and ready to intercept requests.
// return worker.start();
// }
// `worker.start()` returns a Promise that resolves
// once the Service Worker is up and ready to intercept requests.
return worker.start();
}

// enableMocking().then(() => {
// root.render(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export const Container = styled.div`
width: 100rem;

${media.large`
width: 80rem;
padding: 3rem 0;
gap: 3rem;
`}
Expand Down
11 changes: 8 additions & 3 deletions frontend/src/pages/DashboardPage/DashBoardPageLayout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createContext, type PropsWithChildren, useContext, useEffect, useState } from 'react';
import useUserInfo from '@/hooks/useUserInfo';
import * as S from './DashBoardPageLayout.styled';
import { Link, useLocation } from 'react-router-dom';
import { useLocation } from 'react-router-dom';

const PATH_INFO = [
{
Expand Down Expand Up @@ -63,6 +63,11 @@ export default function DashboardPageLayout({ children }: PropsWithChildren) {
const { data: userInfo } = useUserInfo();
const currentPathText = PATH_INFO.find((item) => item.name === path);

const URL =
process.env.NODE_ENV === 'development'
? 'https://dev.devel-up.co.kr'
: 'https://devel-up.co.kr';

return (
<S.Container>
<S.ProfileAndCurrentPathWrapper>
Expand All @@ -78,9 +83,9 @@ export default function DashboardPageLayout({ children }: PropsWithChildren) {
return (
<S.LinkWrapper key={index}>
<S.Circle $isSelected={path.name === location.pathname} />
<Link to={path.name}>
<a href={`${URL}${path.name}`}>
<S.Path $isSelected={path.name === location.pathname}>{path.text}</S.Path>
</Link>
</a>
</S.LinkWrapper>
);
})}
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/pages/DashboardPage/Discussion/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import DashBoardDiscussionList from '@/components/DashBoard/DashboardDiscussion';
import SpinnerSuspense from '@/components/common/SpinnerSuspense';

export default function DashboardDiscussionPage() {
return <DashBoardDiscussionList />;
return (
<SpinnerSuspense>
<DashBoardDiscussionList />
</SpinnerSuspense>
);
}
7 changes: 6 additions & 1 deletion frontend/src/pages/DashboardPage/DiscussionComment/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import DiscussionCommentList from '@/components/DashBoard/DiscussionComment';
import SpinnerSuspense from '@/components/common/SpinnerSuspense';

export default function DashboardDiscussionCommentPage() {
return <DiscussionCommentList />;
return (
<SpinnerSuspense>
<DiscussionCommentList />
</SpinnerSuspense>
);
}
Loading