Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Expand Up @@ -11,7 +11,7 @@ export const CareerContainer = styled.div`
width: 100%;
margin-bottom: 10px;

@media screen and ${({ theme }) => theme.mediaQuery.tablet} {
@media ${({ theme }) => theme.mediaQuery.tablet} {
display: flex;
gap: 10px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const CareerInput = styled.input`
${dateStyle}
}

@media screen and ${({ theme }) => theme.mediaQuery.tablet} {
@media ${({ theme }) => theme.mediaQuery.tablet} {
width: 100%;
margin-bottom: 12px;
font-size: ${({ theme }) => theme.heading.small.fontSize};
Expand Down
2 changes: 1 addition & 1 deletion src/components/auth/InputText.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const Container = styled.div`
background-color: ${({ theme }) => theme.color.white};
width: 100%;

@media screen and ${({ theme }) => theme.mediaQuery.tablet} {
@media ${({ theme }) => theme.mediaQuery.tablet} {
padding: 0.5rem 0.75rem;
`;

Expand Down
14 changes: 7 additions & 7 deletions src/components/common/avatar/Avatar.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ export const AvatarContainer = styled.div<Omit<AvatarProps, 'image'>>`
border-radius: 50%;
border: 1px solid ${({ theme }) => theme.color.border};

.avatar {
width: 100%;
height: 100%;
border-radius: 50%;
}

@media screen and ${({ theme }) => theme.mediaQuery.tablet} {
@media ${({ theme }) => theme.mediaQuery.tablet} {
width: calc(${({ size }) => size} * 0.85);
height: calc(${({ size }) => size} * 0.85);
}
`;

export const AvatarImg = styled.img`
width: 100%;
height: 100%;
border-radius: 50%;
`;
2 changes: 1 addition & 1 deletion src/components/common/avatar/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function Avatar({ size, image }: AvatarProps) {
return (
<S.AvatarContainer size={size}>
{typeof image === 'string' || !image ? (
<img className='avatar' src={releasedImg} alt='Avatar' />
<S.AvatarImg src={releasedImg} alt='Avatar' />
) : (
image
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ import { ProjectSkillTag } from '../../../models/manageMyProject';
import Avatar from './Avatar';
import { UserSkillTag } from '../../../models/applicant';
import { formatImgPath } from '../../../util/formatImgPath';
export interface AvartarListProps {
export interface AvatarListProps {
avatars: ProjectSkillTag[] | UserSkillTag[] | null;
size?: string;
maxCount?: number;
}

function AvartarList({
avatars,
size = '33px',
maxCount = 8,
}: AvartarListProps) {
function AvatarList({ avatars, size = '33px', maxCount = 8 }: AvatarListProps) {
if (!avatars) return;
const displayAvatars = avatars.slice(0, maxCount);

Expand All @@ -32,4 +28,4 @@ function AvartarList({
);
}

export default AvartarList;
export default AvatarList;
137 changes: 89 additions & 48 deletions src/components/common/header/Header.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,66 +9,107 @@ export const HeaderContainer = styled.div`
align-items: center;
padding: 10px 120px;

img {
width: 80px;
height: 80px;
@media ${({ theme }) => theme.mediaQuery.tablet} {
padding: 10px 60px;
}
@media ${({ theme }) => theme.mediaQuery.mobile} {
padding: 10px 16px;
}
`;

@media ${({ theme }) => theme.mediaQuery.tablet} {
width: 70px;
height: 70px;
}
export const Wrapper = styled.nav`
ul {
display: flex;
flex-direction: column;
width: 9rem;

@media ${({ theme }) => theme.mediaQuery.mobile} {
width: 50px;
height: 50px;
}
}
a,
button {
font-size: 0.9rem;
font-weight: 600;
width: 100%;
line-height: 1;
text-align: center;
color: inherit;

.auth {
ul {
display: flex;
flex-direction: column;
width: 9rem;

a,
button {
font-size: 0.9rem;
font-weight: 600;
width: 100%;
line-height: 1;
text-align: center;
color: inherit;

&:hover {
color: ${({ theme }) => theme.color.white};
background-color: ${({ theme }) => theme.color.navy};
}
&:hover {
color: ${({ theme }) => theme.color.white};
background-color: ${({ theme }) => theme.color.navy};
}
}

a {
&:first-child {
border-top-left-radius: ${({ theme }) => theme.borderRadius.primary};
border-top-right-radius: ${({ theme }) => theme.borderRadius.primary};
}
&:last-child {
border-bottom-left-radius: ${({ theme }) =>
theme.borderRadius.primary};
border-bottom-right-radius: ${({ theme }) =>
theme.borderRadius.primary};
}
a {
&:first-child {
border-top-left-radius: ${({ theme }) => theme.borderRadius.primary};
border-top-right-radius: ${({ theme }) => theme.borderRadius.primary};
}

li {
width: 100%;
padding: 1rem;
&:last-child {
border-bottom-left-radius: ${({ theme }) => theme.borderRadius.primary};
border-bottom-right-radius: ${({ theme }) =>
theme.borderRadius.primary};
}
}

li {
width: 100%;
padding: 1rem;
}
}
`;

export const LogoImg = styled.img`
width: 80px;
height: 80px;

@media ${({ theme }) => theme.mediaQuery.tablet} {
padding: 10px 60px;
width: 70px;
height: 70px;
}

@media ${({ theme }) => theme.mediaQuery.mobile} {
padding: 10px 16px;
width: 50px;
height: 50px;
}
`;

export const List = styled.ul`
display: flex;
flex-direction: column;
width: 9rem;

a,
button {
font-size: 0.9rem;
font-weight: 600;
width: 100%;
line-height: 1;
text-align: center;
color: inherit;

&:hover {
color: ${({ theme }) => theme.color.white};
background-color: ${({ theme }) => theme.color.navy};
}
}

a {
&:first-child {
border-top-left-radius: ${({ theme }) => theme.borderRadius.primary};
border-top-right-radius: ${({ theme }) => theme.borderRadius.primary};
}
&:last-child {
border-bottom-left-radius: ${({ theme }) => theme.borderRadius.primary};
border-bottom-right-radius: ${({ theme }) => theme.borderRadius.primary};
}
}

li {
width: 100%;
padding: 1rem;
}
`;

export const Item = styled.li`
width: 100%;
padding: 1rem;
`;
24 changes: 12 additions & 12 deletions src/components/common/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ function Header() {
return (
<S.HeaderContainer>
<Link to={ROUTES.main}>
<img src={Mainlogo} alt='logo' />
<S.LogoImg src={Mainlogo} alt='logo' />
</Link>
<nav className='auth'>
<S.Wrapper>
<DropDown
toggleButton={
isLoading ? (
Expand All @@ -45,31 +45,31 @@ function Header() {
>
<>
{isLoggedIn && (
<ul>
<S.List>
<Link to={ROUTES.mypage}>
<li>마이페이지</li>
<S.Item>마이페이지</S.Item>
</Link>
<Link to={ROUTES.manageProjectsRoot}>
<li>공고관리</li>
<S.Item>공고관리</S.Item>
</Link>
<Link to='#' onClick={(e) => e.preventDefault()}>
<li onClick={userLogout}>로그아웃</li>
<S.Item onClick={userLogout}>로그아웃</S.Item>
</Link>
</ul>
</S.List>
)}
{!isLoggedIn && (
<ul>
<S.List>
<Link to={ROUTES.login}>
<li>로그인</li>
<S.Item>로그인</S.Item>
</Link>
<Link to={ROUTES.signup}>
<li>회원가입</li>
<S.Item>회원가입</S.Item>
</Link>
</ul>
</S.List>
)}
</>
</DropDown>
</nav>
</S.Wrapper>
<Modal isOpen={isOpen} onClose={handleModalClose}>
{message}
</Modal>
Expand Down
8 changes: 5 additions & 3 deletions src/components/common/modal/Modal.styled.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import styled from 'styled-components';

export const ModalContainer = styled.div`
@keyframes fade-in {
export const ModalContainer = styled.div<{
$fade: boolean;
}>`
@keyframes ${({ $fade }) => !$fade && 'fade-in'} {
from {
opacity: 0;
}
Expand All @@ -10,7 +12,7 @@ export const ModalContainer = styled.div`
}
}

@keyframes fade-out {
@keyframes ${({ $fade }) => $fade && 'fade-out'} {
from {
opacity: 1;
}
Expand Down
5 changes: 1 addition & 4 deletions src/components/common/modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ const Modal = ({ children, isOpen, onClose }: ModalProps) => {

return createPortal(
<ScrollPreventor>
<S.ModalContainer
className={isFadingOut ? 'fade-out' : 'fade-in'}
onAnimationEnd={handleAnimationEnd}
>
<S.ModalContainer $fade={isFadingOut} onAnimationEnd={handleAnimationEnd}>
<S.ModalBody ref={modalRefs}>
<ModalCloseButton onClose={handleClose} />
<S.ModalIconWrapper>
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/noResultPage/NoResultPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function NoResultPage({ height }: NoResultPageProps) {
return (
<S.Container height={height}>
<S.Wrapper>
<S.Title className='noResultTitle'>검색 결과가 없습니다.</S.Title>
<S.Title>검색 결과가 없습니다.</S.Title>
<FaceFrownIcon />
</S.Wrapper>
</S.Container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export default function Pagination() {
<ChevronLeftIcon />
</S.PaginationButton>
<S.PaginationDoubleButton
className='doubleButton'
onClick={() => handleUpdateFilters('page', 1)}
>
1
Expand All @@ -75,7 +74,6 @@ export default function Pagination() {
<>
<EllipsisHorizontalIcon />
<S.PaginationDoubleButton
className='doubleButton'
onClick={() => handleUpdateFilters('page', lastPage)}
>
{lastPage}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@ export default function FilteringContents() {
selects={methodTagsData}
defaultValue={SEARCH_FILTERING_DEFAULT_VALUE.METHOD}
/>
<S.BeginnerButtonWrapper
className='filteringButton beginnerButton'
$toggle={searchFilters.isBeginner}
>
<S.BeginnerButtonWrapper $toggle={searchFilters.isBeginner}>
<S.BeginnerButton
$toggle={searchFilters.isBeginner}
onClick={() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export default function Filtering({ selects, defaultValue }: FilteringProps) {
<S.SelectWrapper>
{addAll.map((select) => (
<S.SelectButton
className='option'
key={`${defaultValue}-${select.id}`}
onClick={() => handleValueClick(select.name, select.id)}
>
Expand Down
3 changes: 1 addition & 2 deletions src/components/home/searchFiltering/search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export default function Search() {
<S.SearchForm onSubmit={handleSubmitSearch}>
<S.SearchInput
type='text'
className='search'
placeholder='제목, 글 내용 검색'
value={searchText}
onChange={handleTextChange}
Expand All @@ -37,7 +36,7 @@ export default function Search() {
<XCircleIcon />
</S.SearchButton>
)}
<S.SearchButton className='searchIcon'>
<S.SearchButton>
<MagnifyingGlassIcon />
</S.SearchButton>
</S.ButtonWrapper>
Expand Down
Loading