Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
@@ -1,5 +1,5 @@
import styled from 'styled-components';
import Button from '../../common/Button/Button';
import Button from '../../../common/Button/Button';

export const Container = styled.div`
width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import * as S from './CommentComponentLayout.styled';
import DropDown from '../../../common/dropDown/DropDown';
import DropDownItem from '../DropDownItem';
import { CommentType } from '../../../../models/comment';
import dropdownButton from '../../../assets/dropdownButton.svg';
import dropdownButton from '../../../../assets/dropdownButton.svg';
import useComment from '../../../../hooks/user/CommentHooks/useComment';
import ReplyComponent from '../replyComponent/ReplyComponent';
import ArrowDown from '../../../assets/ArrowDown.svg';
import ArrowUp from '../../../assets/ArrowUp.svg';
import ArrowDown from '../../../../assets/ArrowDown.svg';
import ArrowUp from '../../../../assets/ArrowUp.svg';
import CommentComponent from './commentComponent/CommentComponent';

interface CommentLayoutProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Dispatch, SetStateAction } from 'react';
import * as S from './CommentComponent.styled';
import Avatar from '../../../common/avatar/Avatar';
import { CommentType } from '../../../../models/comment';
import chat from '../../../../assets/chat.svg';
import Avatar from '../../../../common/avatar/Avatar';
import { CommentType } from '../../../../../models/comment';
import chat from '../../../../../assets/chat.svg';
import { Link } from 'react-router-dom';
import { ROUTES } from '../../../../constants/routes';
import { ROUTES } from '../../../../../constants/user/routes';
import CommentInput from '../../commentInput/CommentInput';

interface CommentComponentProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from 'styled-components';
import Button from '../../common/Button/Button';
import Button from '../../../common/Button/Button';

export const InputContainer = styled.div`
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/components/user/comment/commentInput/CommentInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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 DefaultImg from '../../../../assets/defaultImg.png';
import Avatar from '../../../common/avatar/Avatar';
import { useForm } from 'react-hook-form';
import useInputFocus from '../../../../hooks/user/useInputFocus';
Expand Down
4 changes: 2 additions & 2 deletions src/components/user/comment/replyComponent/ReplyComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Avatar from '../../../common/avatar/Avatar';
import * as S from './ReplyComponent.styled';
import DefaultImg from '../../../assets/defaultImg.png';
import DefaultImg from '../../../../assets/defaultImg.png';
import useComment from '../../../../hooks/user/CommentHooks/useComment';
import DropDown from '../../../common/dropDown/DropDown';
import DropDownItem from '../DropDownItem';
import dropdownButton from '../../../assets/dropdownButton.svg';
import dropdownButton from '../../../../assets/dropdownButton.svg';
import CommentInput from '../commentInput/CommentInput';
import useGetReply from '../../../../hooks/user/CommentHooks/useGetReply';
import LoadingSpinner from '../../../common/loadingSpinner/LoadingSpinner';
Expand Down
7 changes: 2 additions & 5 deletions src/components/user/customerService/CustomerServiceHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
ArrowUturnLeftIcon,
MagnifyingGlassIcon,
} from '@heroicons/react/24/outline';
import { MagnifyingGlassIcon, XCircleIcon } from '@heroicons/react/24/outline';
import * as S from './CustomerServiceHeader.styled';
import MovedInquiredLink from './MoveInquiredLink';
import { Outlet } from 'react-router-dom';
Expand Down Expand Up @@ -55,7 +52,7 @@ export default function CustomerServiceHeader({
aria-label='show all result'
onClick={handleReset}
>
<ArrowUturnLeftIcon />
<XCircleIcon />
</S.UturnButton>
)}
<S.SearchButton type='submit' aria-label='search'>
Expand Down
9 changes: 3 additions & 6 deletions src/components/user/customerService/inquiry/Inquiry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export default function Inquiry() {
content: form.content.trim() !== '',
};

console.log(isCategoryOpen);

if (!isValid.category) {
return handleModalOpen(INQUIRY_MESSAGE.selectCategory);
}
Expand Down Expand Up @@ -188,12 +190,7 @@ export default function Inquiry() {
</S.InquiryFileWrapper>
</S.ContentWrapper>
<S.SendButtonWrapper>
<S.SendButton
type='submit'
onClick={() => setIsCategoryOpen((prev) => !prev)}
>
제출
</S.SendButton>
<S.SendButton type='submit'>제출</S.SendButton>
</S.SendButtonWrapper>
</S.InquiryWrapper>
</S.InquiryForm>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import styled from 'styled-components';
import { SpinnerWrapperStyled } from '../../mypage/Spinner.styled';

export const SpinnerWrapper = styled.div`
height: 60vh;
`;
export const SpinnerWrapper = styled(SpinnerWrapperStyled)``;

export const Container = styled.section`
width: 75%;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { EyeIcon } from '@heroicons/react/24/outline';
import { formatDate } from '../../../../../util/format';
import * as S from './NoticeDetailContent.styled';
import logo from '../../../../assets/mainlogo.svg';
import logo from '../../../../../assets/mainlogo.svg';
import ContentBorder from '../../../../common/contentBorder/ContentBorder';

interface NoticeDetailContentProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/user/home/banner/Banner.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as S from './Banner.styled';
import banner from '../../../assets/banner.svg';
import banner from '../../../../assets/banner.svg';

export default function Banner() {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import Pagination from '../../../common/pagination/Pagination';
export type Display = 'flex' | 'grid';

export default function ProjectCardLists() {
const [display, setDisplay] = useState<Display>('grid');
const { projectListsData, isLoading } = useProjectCardListData();
const { searchFilters, handleUpdateFilters } = useSaveSearchFiltering();
const [display, setDisplay] = useState<Display>('grid');

const handleChangePagination = (page: number) => {
handleUpdateFilters('page', page);
Expand All @@ -23,10 +23,12 @@ export default function ProjectCardLists() {
useEffect(() => {
if (projectListsData && Boolean(projectListsData.projects.length)) {
setDisplay('grid');
console.log(projectListsData);
return;
}
setDisplay('flex');
}, [projectListsData]);
console.log(searchFilters);
}, [projectListsData, searchFilters]);

if (isLoading)
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PositionButton from '../../../../common/positionButton/PositionButton';
import * as S from './CardList.styled';
import beginner from '../../../../assets/beginner.svg';
import beginner from '../../../../../assets/beginner.svg';
import Avatar from '../../../../common/avatar/Avatar';
import { EyeIcon } from '@heroicons/react/24/outline';
import type { ProjectList } from '../../../../../models/mainProjectLists';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import Filtering from './filtering/Filtering';
import * as S from './FilteringContents.styled';
import beginner from '../../../../assets/beginner.svg';
import beginner from '../../../../../assets/beginner.svg';
import { ChevronDownIcon } from '@heroicons/react/24/outline';
import SkillTagBox from '../../../../common/skillTagBox/SkillTagBox';
import React, { useState } from 'react';
import { useSearchFilteringSkillTag } from '../../../../../hooks/user/useSearchFilteringSkillTag';
import { useOutsideClick } from '../../../../../hooks/user/useOutsideClick';
import { useSaveSearchFiltering } from '../../../../../hooks/user/useSaveSearchFiltering';
import { SEARCH_FILTERING_DEFAULT_VALUE } from '../../../../../constants/user/homeConstants';
import SkillTagBox from '../../../../common/skillTagBox/SkillTagBox';

export default function FilteringContents() {
const { positionTagsData, methodTagsData } = useSearchFilteringSkillTag();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ChevronDownIcon } from '@heroicons/react/24/outline';
import * as S from './Filtering.styled';
import { useEffect, useState } from 'react';
import type { MethodTag, PositionTag } from '../../../../../models/tags';
import { useOutsideClick } from '../../../../../hooks/useOutsideClick';
import { useSaveSearchFiltering } from '../../../../../hooks/useSaveSearchFiltering';
import { SEARCH_FILTERING_DEFAULT_VALUE } from '../../../../../constants/homeConstants';
import type { MethodTag, PositionTag } from '../../../../../../models/tags';
import { useOutsideClick } from '../../../../../../hooks/user/useOutsideClick';
import { useSaveSearchFiltering } from '../../../../../../hooks/user/useSaveSearchFiltering';
import { SEARCH_FILTERING_DEFAULT_VALUE } from '../../../../../../constants/user/homeConstants';

interface FilteringProps {
selects: PositionTag[] | MethodTag[];
Expand Down
3 changes: 1 addition & 2 deletions src/components/user/manageProjects/CardList.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import * as S from './CardList.styled';

import type { ManagedProject } from '../../../models/manageMyProject';
import Card from './Card';
import CreateButton from '../../assets/createProjectButton.svg';
import CreateButton from '../../../assets/createProjectButton.svg';
import { ROUTES } from '../../../constants/user/routes';

interface CardListProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ export const DeleteButton = styled.button`
color: #e69191;
width: 1.2rem;
height: 1.2rem;
border-radius: 50%;
}

&:hover {
transform: scale(1.1);
svg {
color: ${({ theme }) => theme.color.white};
}
}

&:disabled {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
import { ButtonHTMLAttributes } from 'react';
import * as S from './DeleteButton.styled';
import { XCircleIcon } from '@heroicons/react/24/outline';
import { XMarkIcon } from '@heroicons/react/24/outline';
interface DeleteButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
onClick: () => void;
disabled: boolean;
}

function DeleteButton({ onClick, disabled }: DeleteButtonProps) {
return (
<S.DeleteButton onClick={onClick} disabled={disabled}>
<XCircleIcon />
<S.DeleteButton
onClick={(e: React.MouseEvent<HTMLButtonElement>) => {
e.stopPropagation();
onClick();
}}
disabled={disabled}
>
<XMarkIcon />
</S.DeleteButton>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const ItemWrapper = styled.li`
align-items: center;
width: 100%;
padding: 1rem;
cursor: pointer;
border: 1px solid ${({ theme }) => theme.color.grey};
border-radius: ${({ theme }) => theme.borderRadius.primary};
transition: all 0.2s ease;
Expand All @@ -23,7 +24,6 @@ export const ItemWrapper = styled.li`
export const NickName = styled.p`
font-size: ${({ theme }) => theme.heading.small.fontSize};
font-weight: 400;
cursor: pointer;

@media ${({ theme }) => theme.mediaQuery.tablet} {
font-size: ${({ theme }) => theme.heading.small.tabletFontSize};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,26 @@ import * as S from './PassNonPassItem.styled';
interface PassNonPassItemProps {
userInfo: ApplicantInfo;
projectData: ProjectDetailPlusExtended;
hanldeStatus: ({ status, userId }: useMutationParams) => void;
handleStatus: ({ status, userId }: useMutationParams) => void;
handleUserInfo: (userId: number) => void;
}

function PassNonPassItem({
userInfo,
hanldeStatus,
handleStatus,
projectData,
handleUserInfo,
}: PassNonPassItemProps) {
return (
<S.ItemWrapper>
<S.NickName onClick={() => handleUserInfo(userInfo.userId)}>
{userInfo.user.nickname}
</S.NickName>
<S.ItemWrapper
onClick={() => handleUserInfo(userInfo.userId)}
aria-label='지원자 이력보기'
>
<S.NickName>{userInfo.user.nickname}</S.NickName>
<DeleteButton
disabled={projectData.isDone}
onClick={() =>
hanldeStatus({ status: 'WAITING', userId: userInfo.userId })
handleStatus({ status: 'WAITING', userId: userInfo.userId })
}
/>
</S.ItemWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function PassNonPassList({
<PassNonPassItem
key={data.userId}
handleUserInfo={handleUserInfo}
hanldeStatus={handleStatus}
handleStatus={handleStatus}
userInfo={data}
projectData={projectData}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from 'styled-components';
import Button from '../../common/Button/Button';
import Button from '../../../common/Button/Button';

export const Wrapper = styled.div`
width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion src/components/user/mypage/ContentTab.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from 'react';
import * as S from './ContentTab.styled';
import { Link, Outlet, useLocation } from 'react-router-dom';
import { ROUTES } from '../../constants/routes';
import { ROUTES } from '../../../constants/user/routes';
import ScrollWrapper from './ScrollWrapper';
import MovedInquiredLink from '../customerService/MoveInquiredLink';

Expand Down
10 changes: 9 additions & 1 deletion src/components/user/mypage/Spinner.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const spin = keyframes`
}
`;

export const SpinnerWrapper = styled.div`
export const SpinnerContainer = styled.div`
display: flex;
justify-content: center;
align-items: center;
Expand All @@ -25,3 +25,11 @@ export const Circle = styled.div<{ $size: string; $color: string }>`
border-radius: 50%;
animation: ${spin} 1s linear infinite;
`;

export const SpinnerWrapperStyled = styled.div`
width: 100vw;
height: 60vh;
display: flex;
justify-content: center;
align-items: center;
`;
4 changes: 2 additions & 2 deletions src/components/user/mypage/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ interface SpinnerProps {

const Spinner = ({ size = '50px', color = '#3e5879' }: SpinnerProps) => {
return (
<S.SpinnerWrapper>
<S.SpinnerContainer>
<S.Circle $size={size} $color={color} />
</S.SpinnerWrapper>
</S.SpinnerContainer>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Inquiries() {
const { myInquiriesData, isLoading } = useGetMyInquiries();

if (isLoading) {
return <Spinner size='50px' color='#3e5879' />;
return <Spinner />;
}

if (!myInquiriesData || myInquiriesData?.length === 0)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react';
import type { MyInquiries } from '../../../../../models/activityLog';
import type { MyInquiries } from '../../../../../../models/activityLog';
import * as S from './Inquiry.styled';
import { My_INQUIRIES_MESSAGE } from '../../../../../constants/customerService';
import { My_INQUIRIES_MESSAGE } from '../../../../../../constants/user/customerService';

interface InquiryProps {
list: MyInquiries;
Expand Down
3 changes: 2 additions & 1 deletion src/components/user/mypage/joinedProject/MyJoinProjects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ const MyJoinProjects = () => {
const { myJoinedProjectListData, isLoading } = useMyJoinedProjectList();

if (isLoading) {
return <Spinner size='50px' color='#3e5879' />;
return <Spinner />;
}

if (!myJoinedProjectListData) return;

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/user/mypage/joinedProject/Project.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as S from './Project.styled';
import BeginnerIcon from '../../../assets/beginner.svg';
import BeginnerIcon from '../../../../assets/beginner.svg';
import { EllipsisHorizontalIcon } from '@heroicons/react/24/outline';
import { JoinedProject } from '../../../../models/userProject';

Expand Down
Loading