diff --git a/src/api/applicant.api.ts b/src/api/applicant.api.ts
index 639284b9..2fe828b4 100644
--- a/src/api/applicant.api.ts
+++ b/src/api/applicant.api.ts
@@ -1,4 +1,4 @@
-import { ApiApplicantInfo, ApiApplicants } from '../models/applicant';
+import type { ApiApplicantInfo, ApiApplicants } from '../models/applicant';
import { httpClient } from './http.api';
export const getApplicantList = async (projectId: number) => {
diff --git a/src/api/auth.api.ts b/src/api/auth.api.ts
index b00e5634..31692e2d 100644
--- a/src/api/auth.api.ts
+++ b/src/api/auth.api.ts
@@ -1,4 +1,4 @@
-import { ApiVerifyNickname, VerifyEmail } from '../models/auth';
+import type { ApiVerifyNickname, VerifyEmail } from '../models/auth';
import { httpClient } from './http.api';
import { loginFormValues } from '../pages/login/Login';
import { registerFormValues } from '../pages/user/register/Register';
diff --git a/src/api/comment.api.ts b/src/api/comment.api.ts
index 8de2df25..4c334148 100644
--- a/src/api/comment.api.ts
+++ b/src/api/comment.api.ts
@@ -1,4 +1,4 @@
-import { CommentType } from '../models/comment';
+import type { CommentType } from '../models/comment';
import { httpClient } from './http.api';
export const postComment = async (id: number, content: string) => {
diff --git a/src/api/evaluation.api.ts b/src/api/evaluation.api.ts
index 5bb99af1..4ff79d99 100644
--- a/src/api/evaluation.api.ts
+++ b/src/api/evaluation.api.ts
@@ -1,4 +1,4 @@
-import { apiEvaluatedUser } from '../models/evaluation';
+import type { apiEvaluatedUser } from '../models/evaluation';
import { httpClient } from './http.api';
export const postEvaluation = async (userEvaluation: apiEvaluatedUser) => {
diff --git a/src/api/joinProject.api.ts b/src/api/joinProject.api.ts
index bd529a96..32bb07fc 100644
--- a/src/api/joinProject.api.ts
+++ b/src/api/joinProject.api.ts
@@ -1,6 +1,6 @@
-import { FormData } from '../models/createProject';
-import { joinProject } from '../models/joinProject';
-import { ProjectDetailPlusExtended } from '../models/projectDetail';
+import type { FormData } from '../models/createProject';
+import type { joinProject } from '../models/joinProject';
+import type { ProjectDetailPlusExtended } from '../models/projectDetail';
import { httpClient } from './http.api';
export const getProjectData = async (
diff --git a/src/api/myProjectList.api.ts b/src/api/myProjectList.api.ts
index 4371c0fc..798eda6b 100644
--- a/src/api/myProjectList.api.ts
+++ b/src/api/myProjectList.api.ts
@@ -1,4 +1,7 @@
-import { ManagedProject, ApiManagedProjects } from '../models/manageMyProject';
+import type {
+ ManagedProject,
+ ApiManagedProjects,
+} from '../models/manageMyProject';
import { httpClient } from './http.api';
export const getMyProjectLists = async () => {
diff --git a/src/api/mypage.api.ts b/src/api/mypage.api.ts
index 1178f506..594a2593 100644
--- a/src/api/mypage.api.ts
+++ b/src/api/mypage.api.ts
@@ -1,5 +1,12 @@
-import { ApiUserInfo, ApiUserInfoImg, EditMyInfo } from '../models/userInfo';
-import { ApiAppliedProject, ApiJoinedProject } from '../models/userProject';
+import type {
+ ApiUserInfo,
+ ApiUserInfoImg,
+ EditMyInfo,
+} from '../models/userInfo';
+import type {
+ ApiAppliedProject,
+ ApiJoinedProject,
+} from '../models/userProject';
import { httpClient } from './http.api';
export const getMyInfo = async () => {
diff --git a/src/api/projectLists.api.ts b/src/api/projectLists.api.ts
index d47bead2..a2473dac 100644
--- a/src/api/projectLists.api.ts
+++ b/src/api/projectLists.api.ts
@@ -2,7 +2,7 @@ import type {
ApiProjectLists,
ApiProjectStatistic,
} from '../models/mainProjectLists';
-import { SearchFilters } from '../models/SearchFilters';
+import type { SearchFilters } from '../models/SearchFilters';
import { httpClient } from './http.api';
export const getProjectLists = async (params: SearchFilters) => {
diff --git a/src/api/reply.api.ts b/src/api/reply.api.ts
index d1cfd4cc..804100ae 100644
--- a/src/api/reply.api.ts
+++ b/src/api/reply.api.ts
@@ -1,4 +1,4 @@
-import { ReplyType } from '../models/comment';
+import type { ReplyType } from '../models/comment';
import { httpClient } from './http.api';
export const getReply = async (
diff --git a/src/api/report.api.ts b/src/api/report.api.ts
index 66653b8f..111ef186 100644
--- a/src/api/report.api.ts
+++ b/src/api/report.api.ts
@@ -1,4 +1,4 @@
-import { ApiPostContent } from '../models/report';
+import type { ApiPostContent } from '../models/report';
import { httpClient } from './http.api';
export const postReport = async (formData: ApiPostContent) => {
diff --git a/src/assets/ArrowRight.svg b/src/assets/ArrowRight.svg
new file mode 100644
index 00000000..5262e81d
--- /dev/null
+++ b/src/assets/ArrowRight.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/components/common/Toast/Toast.styled.ts b/src/components/common/Toast/Toast.styled.ts
index e0d90ae2..beac879d 100644
--- a/src/components/common/Toast/Toast.styled.ts
+++ b/src/components/common/Toast/Toast.styled.ts
@@ -21,15 +21,16 @@ export const Container = styled.div`
`;
export const Item = styled.div<{ $exiting: boolean }>`
- background-color: ${({ theme }) => theme.buttonScheme.grey.color};
+ background-color: #ffffff;
+ border: 6px solid ${({ theme }) => theme.color.border};
padding: 12px 20px;
- border-radius: ${({ theme }) => theme.borderRadius.small};
+ border-radius: ${({ theme }) => theme.borderRadius.primary};
animation: ${fadeInUp} 0.3s ease-out,
${({ $exiting }) => $exiting && fadeOut} 0.3s ease-in forwards;
`;
export const LiveMessage = styled.p`
- color: ${({ theme }) => theme.color.white};
+ color: ${({ theme }) => theme.color.primary};
font-size: 0.95rem;
white-space: nowrap;
overflow: hidden;
@@ -37,9 +38,22 @@ export const LiveMessage = styled.p`
`;
export const LiveDate = styled.p`
- color: ${({ theme }) => theme.color.white};
+ color: ${({ theme }) => theme.color.primary};
font-size: 0.95rem;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
+ margin-right: 5px;
+ opacity: 80%;
+`;
+
+export const TypeArea = styled.div`
+ display: flex;
+ margin-left: 1px;
+`;
+
+export const Type = styled.p``;
+
+export const TypeFilter = styled.p`
+ color: ${({ theme }) => theme.color.primary};
+ font-size: 0.95rem;
+ opacity: 80%;
+ margin-right: 6px;
`;
diff --git a/src/components/common/Toast/ToastItem.tsx b/src/components/common/Toast/ToastItem.tsx
index a0b08e04..b3dd58b2 100644
--- a/src/components/common/Toast/ToastItem.tsx
+++ b/src/components/common/Toast/ToastItem.tsx
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import * as S from './Toast.styled';
-import { AlarmLive } from '../../../models/alarm';
+import type { AlarmLive } from '../../../models/alarm';
import { Link } from 'react-router-dom';
import { routeSelector } from '../../../util/routeSelector';
import { timeAgo } from '../../../util/timeAgo';
@@ -29,7 +29,18 @@ const ToastItem = ({ content, duration, onRemove }: ToastItemProps) => {
{content.message}
- {timeAgo(content.createAt)}
+
+ {timeAgo(content.createAt)} |
+
+ {content.alarmFilterId === 1
+ ? '문의 답변'
+ : content.alarmFilterId === 2
+ ? '지원자 확인'
+ : content.alarmFilterId === 3
+ ? '댓글 답변'
+ : '기타'}
+
+
);
diff --git a/src/components/common/Toast/ToastProvider.tsx b/src/components/common/Toast/ToastProvider.tsx
index 46a54ea6..1a57fdff 100644
--- a/src/components/common/Toast/ToastProvider.tsx
+++ b/src/components/common/Toast/ToastProvider.tsx
@@ -1,7 +1,7 @@
import { PropsWithChildren, useCallback, useEffect, useState } from 'react';
import { ToastContext, ToastMessage } from '../../../context/ToastContext';
import ToastContainer from './ToastContainer';
-import { AlarmLive } from '../../../models/alarm';
+import type { AlarmLive } from '../../../models/alarm';
export const ToastProvider = ({ children }: PropsWithChildren) => {
const [toasts, setToasts] = useState([]);
diff --git a/src/components/common/avatar/AvatarList.tsx b/src/components/common/avatar/AvatarList.tsx
index 5377257e..6ce87318 100644
--- a/src/components/common/avatar/AvatarList.tsx
+++ b/src/components/common/avatar/AvatarList.tsx
@@ -1,7 +1,7 @@
import * as S from './AvatarList.styled';
import Avatar from './Avatar';
import { formatImgPath } from '../../../util/formatImgPath';
-import { SkillTag } from '../../../models/tags';
+import type { SkillTag } from '../../../models/tags';
export interface AvatarListProps {
avatars: SkillTag[] | null;
size?: string;
diff --git a/src/components/common/dropDown/DropDown.styled.ts b/src/components/common/dropDown/DropDown.styled.ts
index 723df0e5..f9f3d83f 100644
--- a/src/components/common/dropDown/DropDown.styled.ts
+++ b/src/components/common/dropDown/DropDown.styled.ts
@@ -1,4 +1,4 @@
-import styled from 'styled-components';
+import styled, { css } from 'styled-components';
export const DropDownContainer = styled.div`
position: relative;
@@ -11,12 +11,20 @@ export const DropDownButtonWrapper = styled.div`
outline: none;
`;
-export const Panel = styled.div`
+export const Panel = styled.div<{ $comment: boolean }>`
position: absolute;
- top: 50px;
+ top: 40px;
right: 0;
background-color: ${({ theme }) => theme.color.white};
border-radius: ${({ theme }) => theme.borderRadius.primary};
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
z-index: 100;
+
+ ${({ $comment }) =>
+ $comment &&
+ css`
+ position: absolute;
+ top: 0px;
+ right: 30px;
+ `}
`;
diff --git a/src/components/common/dropDown/DropDown.tsx b/src/components/common/dropDown/DropDown.tsx
index 515f87a0..32c40a6e 100644
--- a/src/components/common/dropDown/DropDown.tsx
+++ b/src/components/common/dropDown/DropDown.tsx
@@ -7,12 +7,14 @@ interface DropDownProps {
children: React.ReactNode;
toggleButton: React.ReactNode;
isOpen?: boolean;
+ comment: boolean;
}
const DropDown = ({
children,
toggleButton,
isOpen = false,
+ comment,
...props
}: DropDownProps) => {
const [open, setOpen] = useState(isOpen);
@@ -31,7 +33,7 @@ const DropDown = ({
>
{toggleButton}
- {open && {children}}
+ {open && {children}}
);
diff --git a/src/components/common/header/Header.tsx b/src/components/common/header/Header.tsx
index c2dc1aaf..a8c6c482 100644
--- a/src/components/common/header/Header.tsx
+++ b/src/components/common/header/Header.tsx
@@ -83,6 +83,7 @@ function Header() {
)
}
+ comment={false}
>
<>
{isLoggedIn && (
diff --git a/src/components/common/header/Notification/Notification.styled.ts b/src/components/common/header/Notification/Notification.styled.ts
index 1250b3b1..c09ced8e 100644
--- a/src/components/common/header/Notification/Notification.styled.ts
+++ b/src/components/common/header/Notification/Notification.styled.ts
@@ -22,7 +22,26 @@ export const ScrollArea = styled.div`
}
`;
+export const NotificationHeader = styled.div`
+ display: flex;
+ justify-content: right;
+ align-items: center;
+ height: fix-content;
+ margin-right: 15px;
+`;
+
+export const MoreArea = styled.button``;
+
+export const More = styled.span``;
+
+export const Arrow = styled.img`
+ margin-bottom: 3px;
+`;
+
export const NonContentsMessage = styled.p`
+ display: flex;
+ justify-content: center;
+ align-items: center;
margin-left: 6px;
`;
diff --git a/src/components/common/header/Notification/Notification.tsx b/src/components/common/header/Notification/Notification.tsx
index 9b74bc80..cf8daa84 100644
--- a/src/components/common/header/Notification/Notification.tsx
+++ b/src/components/common/header/Notification/Notification.tsx
@@ -3,8 +3,12 @@ import * as S from './Notification.styled';
import NotificationItem from './NotificationItem/NotificationItem';
import LoadingSpinner from '../../loadingSpinner/LoadingSpinner';
import useAlarmList from '../../../../hooks/user/useAlarmList';
+import arrow_right from '../../../../assets/ArrowRight.svg';
+import { useNavigate } from 'react-router-dom';
+import { ROUTES } from '../../../../constants/user/routes';
const Notification = () => {
+ const navigate = useNavigate();
const { alarmListData: AlarmData, isLoading, isFetching } = useAlarmList();
if (!AlarmData) {
@@ -21,6 +25,17 @@ const Notification = () => {
return (
+
+
+ navigate(`${ROUTES.mypage}/${ROUTES.myPageNotifications}`)
+ }
+ >
+ 더보기
+
+
+
+
{AlarmData.map((item, index) => (
diff --git a/src/components/common/header/Notification/NotificationItem/NotificationItem.styled.ts b/src/components/common/header/Notification/NotificationItem/NotificationItem.styled.ts
index 954f4a7e..ce92af65 100644
--- a/src/components/common/header/Notification/NotificationItem/NotificationItem.styled.ts
+++ b/src/components/common/header/Notification/NotificationItem/NotificationItem.styled.ts
@@ -1,16 +1,47 @@
-import styled from 'styled-components';
+import styled, { css } from 'styled-components';
export const Container = styled.div`
padding: 8px 0;
font-size: 14px;
`;
+export const TypeArea = styled.div`
+ display: flex;
+ margin-left: 6px;
+`;
+
+export const Type = styled.p``;
+
+export const TypeFilter = styled.p`
+ font-size: 12px;
+ opacity: 50%;
+ margin-right: 6px;
+`;
+
export const ItemContent = styled.p`
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
margin-left: 6px;
`;
export const Time = styled.span`
- margin-left: 6px;
color: #999;
font-size: 12px;
+ margin-left: 6px;
+ margin-right: 5px;
+`;
+
+export const Dot = styled.span<{ $isRead: boolean }>`
+ width: 5px;
+ height: 5px;
+ background-color: #ff3b30;
+ border-radius: 50%;
+ margin-top: 6px;
+
+ ${({ $isRead }) =>
+ $isRead &&
+ css`
+ background-color: #00db42;
+ `}
`;
diff --git a/src/components/common/header/Notification/NotificationItem/NotificationItem.tsx b/src/components/common/header/Notification/NotificationItem/NotificationItem.tsx
index 5f0fae79..11cd27d5 100644
--- a/src/components/common/header/Notification/NotificationItem/NotificationItem.tsx
+++ b/src/components/common/header/Notification/NotificationItem/NotificationItem.tsx
@@ -1,5 +1,5 @@
import { Link } from 'react-router-dom';
-import { Alarm } from '../../../../../models/alarm';
+import type { Alarm } from '../../../../../models/alarm';
import * as S from './NotificationItem.styled';
import { routeSelector } from '../../../../../util/routeSelector';
import { useContext } from 'react';
@@ -17,7 +17,19 @@ const NotificationItem = ({ item }: NotificationItemProps) => {
{item.content}
- {timeAgo(item.createdAt)}
+
+ {timeAgo(item.createdAt)}
+
+ {item.alarmFilterId === 1
+ ? '문의 답변'
+ : item.alarmFilterId === 2
+ ? '지원자 확인'
+ : item.alarmFilterId === 3
+ ? '댓글 답변'
+ : '기타'}
+
+
+
);
diff --git a/src/components/user/comment/CommentLayout.styled.ts b/src/components/user/comment/CommentLayout.styled.ts
index d9a6394e..ecfb5aea 100644
--- a/src/components/user/comment/CommentLayout.styled.ts
+++ b/src/components/user/comment/CommentLayout.styled.ts
@@ -17,6 +17,7 @@ export const Count = styled.span`
export const CommentContainer = styled.div``;
export const CommentInput = styled.div`
+ display: flex;
margin-bottom: 40px;
`;
diff --git a/src/components/user/comment/CommentLayout.tsx b/src/components/user/comment/CommentLayout.tsx
index 055d3ec5..14ac08fe 100644
--- a/src/components/user/comment/CommentLayout.tsx
+++ b/src/components/user/comment/CommentLayout.tsx
@@ -3,6 +3,10 @@ import CommentInput from './commentInput/CommentInput';
import LoadingSpinner from '../../common/loadingSpinner/LoadingSpinner';
import useGetComment from '../../../hooks/user/CommentHooks/useGetComment';
import CommentComponentLayout from './commentComponent/CommentComponentLayout';
+import Avatar from '../../common/avatar/Avatar';
+import { useMyProfileInfo } from '../../../hooks/user/useMyInfo';
+import { formatImgPath } from '../../../util/formatImgPath';
+import DefaultImg from '../../../assets/defaultImg.png';
interface CommentLayoutProps {
projectId: number;
@@ -15,8 +19,15 @@ const CommentLayout = ({
createrId,
loginUserId,
}: CommentLayoutProps) => {
+ const { myData } = useMyProfileInfo();
const { getCommentList, isLoading, isFetching } = useGetComment(projectId);
+ const profileImg = myData?.profileImg
+ ? `${import.meta.env.VITE_APP_IMAGE_CDN_URL}/${formatImgPath(
+ myData.profileImg
+ )}?w=86&h=86&fit=crop&crop=entropy&auto=format,enhance&q=60`
+ : DefaultImg;
+
if (!getCommentList) {
return (
@@ -37,6 +48,7 @@ const CommentLayout = ({
+
diff --git a/src/components/user/comment/DropDownItem.styled.ts b/src/components/user/comment/DropDownItem.styled.ts
index 3864d4ae..170fccb1 100644
--- a/src/components/user/comment/DropDownItem.styled.ts
+++ b/src/components/user/comment/DropDownItem.styled.ts
@@ -1,29 +1,32 @@
import styled from 'styled-components';
-export const Container = styled.div`
- position: absolute;
- top: -20px;
- right: 0;
- width: 120px;
- background-color: #f7f7f7;
- border: 1px solid #e0e0e0;
- border-radius: 4px;
- overflow: hidden;
- z-index: 999;
+export const Container = styled.ul`
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ width: 5.5rem;
`;
export const Item = styled.div`
padding: 12px 16px;
- font-size: 14px;
- color: #333;
+ font-size: 0.9rem;
+ font-weight: 600;
+ line-height: 1;
+ color: inherit;
cursor: pointer;
- background-color: #f7f7f7;
&:hover {
- background-color: #eaeaea;
+ color: ${({ theme }) => theme.color.white};
+ background-color: ${({ theme }) => theme.color.navy};
}
- & + & {
- border-top: 1px solid #ccc;
+ &:last-child {
+ border-bottom-left-radius: ${({ theme }) => theme.borderRadius.primary};
+ border-bottom-right-radius: ${({ theme }) => theme.borderRadius.primary};
}
`;
+
+export const ReportItem = styled(Item)`
+ border-top-left-radius: ${({ theme }) => theme.borderRadius.primary};
+ border-top-right-radius: ${({ theme }) => theme.borderRadius.primary};
+`;
diff --git a/src/components/user/comment/DropDownItem.tsx b/src/components/user/comment/DropDownItem.tsx
index f6de9cf5..27bcbb3b 100644
--- a/src/components/user/comment/DropDownItem.tsx
+++ b/src/components/user/comment/DropDownItem.tsx
@@ -1,8 +1,8 @@
import useDeleteComment from '../../../hooks/user/CommentHooks/useDeleteComment';
import useDeleteReply from '../../../hooks/user/CommentHooks/useDeleteReply';
-import { useModal } from '../../../hooks/useModal';
import ReportModal from '../reportComponent/ReportModal';
import * as S from './DropDownItem.styled';
+import useReportModal from '../../../hooks/user/useReportModal';
interface DropdownProps {
projectId: number;
@@ -29,7 +29,8 @@ const DropDownItem = ({
}: DropdownProps) => {
const { removeComment } = useDeleteComment(projectId);
const { removeReply } = useDeleteReply(commentId, projectId);
- const { isOpen, handleOpenReportModal, handleCloseReportModal } = useModal();
+ const { isOpen, handleOpenReportModal, handleCloseReportModal } =
+ useReportModal();
const onDelete = (commentId: number, recommentId?: number) => {
if (reply && recommentId) {
@@ -41,9 +42,8 @@ const DropDownItem = ({
return (
<>
+ 신고하기
- 신고하기
-
{loginUserId === commentUserId && (
<>
@@ -61,6 +61,7 @@ const DropDownItem = ({
targetId={recommentId ? recommentId : commentId}
type={recommentId ? 'recomment' : 'comment'}
onClose={handleCloseReportModal}
+ route={projectId}
/>
)}
>
diff --git a/src/components/user/comment/commentComponent/CommentComponentLayout.styled.ts b/src/components/user/comment/commentComponent/CommentComponentLayout.styled.ts
index 7e478c2f..e9f988c1 100644
--- a/src/components/user/comment/commentComponent/CommentComponentLayout.styled.ts
+++ b/src/components/user/comment/commentComponent/CommentComponentLayout.styled.ts
@@ -17,18 +17,18 @@ export const ReplyContainer = styled.div`
cursor: pointer;
`;
-export const ReplyContent = styled.p`
- margin-bottom: 30px;
-`;
+export const ReplyContent = styled.p``;
export const CommentInput = styled.div`
text-indent: 20px;
`;
export const ShowReply = styled.div`
- padding-left: 85px;
-`;
-
-export const ShowReplyButton = styled.span`
- display: flex;
+ display: inline-flex;
+ align-items: center;
+ margin-left: 85px;
+ margin-bottom: 30px;
+ width: fit-content;
+ height: fit-content;
+ cursor: pointer;
`;
diff --git a/src/components/user/comment/commentComponent/CommentComponentLayout.tsx b/src/components/user/comment/commentComponent/CommentComponentLayout.tsx
index a9316519..f0073fff 100644
--- a/src/components/user/comment/commentComponent/CommentComponentLayout.tsx
+++ b/src/components/user/comment/commentComponent/CommentComponentLayout.tsx
@@ -51,51 +51,44 @@ const CommentComponentLayout = ({
projectId={projectId}
setActivateEditMode={setActivateEditMode}
/>
-
- }
- >
- onEdit(item.id)}
- loginUserId={loginUserId}
- commentUserId={item.user.id}
- reportTitle={item.content}
- activateEditMode={activateEditMode}
- />
-
-
-
-
- {item.recommentCount !== 0 && (
- handleShowReplyClick(item.id)}>
-
-
- {isShowReply ? (
-
- ) : (
-
- )}
-
-
- {item.recommentCount}개 답글 확인
-
-
-
- )}
-
- {isShowReply === item.id && (
-
-
+ }
+ comment={true}
+ >
+ onEdit(item.id)}
+ loginUserId={loginUserId}
+ commentUserId={item.user.id}
+ reportTitle={item.content}
+ activateEditMode={activateEditMode}
/>
-
+
)}
-
+
+
+ {item.recommentCount !== 0 && (
+ handleShowReplyClick(item.id)}>
+
+ {isShowReply ?
:
}
+
+ {item.recommentCount}개 답글 확인
+
+ )}
+
+ {isShowReply === item.id && (
+
+
+
+ )}
))}
>
diff --git a/src/components/user/comment/commentComponent/commentComponent/CommentComponent.styled.ts b/src/components/user/comment/commentComponent/commentComponent/CommentComponent.styled.ts
index 2584fde7..a53dee1a 100644
--- a/src/components/user/comment/commentComponent/commentComponent/CommentComponent.styled.ts
+++ b/src/components/user/comment/commentComponent/commentComponent/CommentComponent.styled.ts
@@ -1,7 +1,17 @@
-import styled from 'styled-components';
+import styled, { css } from 'styled-components';
-export const Container = styled.div`
+export const Container = styled.div<{ $reply: boolean }>`
flex: 1;
+
+ ${({ $reply }) =>
+ $reply &&
+ css`
+ display: flex;
+ justify-content: space-between;
+ width: 100%;
+ margin-bottom: 20px;
+ padding-left: 85px;
+ `}
`;
export const Wrapper = styled.div`
@@ -11,17 +21,18 @@ export const Wrapper = styled.div`
export const CommentWrapper = styled.div`
margin-top: 4px;
- flex: 1;
`;
export const NickName = styled.p`
font-size: ${({ theme }) => theme.heading.xsSmall.fontSize};
margin-left: 11px;
margin-bottom: 3px;
+ opacity: 60%;
`;
export const Comment = styled.span`
display: inline-block;
+ font-weight: 500;
max-width: calc(100% - 12px);
word-break: break-word;
white-space: pre-wrap;
diff --git a/src/components/user/comment/commentComponent/commentComponent/CommentComponent.tsx b/src/components/user/comment/commentComponent/commentComponent/CommentComponent.tsx
index 85977be1..f07942d0 100644
--- a/src/components/user/comment/commentComponent/commentComponent/CommentComponent.tsx
+++ b/src/components/user/comment/commentComponent/commentComponent/CommentComponent.tsx
@@ -38,7 +38,7 @@ const CommentComponent = ({
projectId,
}: CommentComponentProps) => {
return (
-
+
`
opacity: ${({ $isFocused }) => ($isFocused ? 1.0 : 0.2)};
border: ${({ $isFocused }) => ($isFocused ? 2 : 1)};
+ margin-top: 4px;
margin-left: 10px;
`;
diff --git a/src/components/user/comment/commentInput/CommentInput.tsx b/src/components/user/comment/commentInput/CommentInput.tsx
index 6e39312d..94f07d1d 100644
--- a/src/components/user/comment/commentInput/CommentInput.tsx
+++ b/src/components/user/comment/commentInput/CommentInput.tsx
@@ -1,9 +1,5 @@
import * as S from './CommentInput.styled';
import { Dispatch, SetStateAction, useEffect } from 'react';
-import { useMyProfileInfo } from '../../../../hooks/user/useMyInfo';
-import { formatImgPath } from '../../../../util/formatImgPath';
-import DefaultImg from '../../../../assets/defaultImg.png';
-import Avatar from '../../../common/avatar/Avatar';
import { useForm } from 'react-hook-form';
import useInputFocus from '../../../../hooks/user/useInputFocus';
import usePostReply from '../../../../hooks/user/CommentHooks/usePostReply';
@@ -36,7 +32,6 @@ const CommentInput = ({
recommentId,
setActivateEditMode,
}: CommentInputProps) => {
- const { myData } = useMyProfileInfo();
const {
handleSubmit: onSubmitHandler,
watch,
@@ -50,12 +45,6 @@ const CommentInput = ({
const { createReply } = usePostReply(projectId, commentId);
const { changeReply } = usePatchReply(recommentId, commentId, projectId);
- const profileImg = myData?.profileImg
- ? `${import.meta.env.VITE_APP_IMAGE_CDN_URL}/${formatImgPath(
- myData.profileImg
- )}?w=86&h=86&fit=crop&crop=entropy&auto=format,enhance&q=60`
- : DefaultImg;
-
const hasInput = Boolean(watch('commentInput', ''));
const handleSubmit = (data: { commentInput: string }) => {
@@ -86,7 +75,6 @@ const CommentInput = ({
return (
- {!activateEditMode && }