Skip to content

Commit

Permalink
Merge branch 'main' into #29-CreateNotice
Browse files Browse the repository at this point in the history
  • Loading branch information
drainxc authored Dec 27, 2022
2 parents 662f294 + 000106c commit abd1c87
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 22 deletions.
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<!-- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
Expand All @@ -29,7 +29,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>INFO</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const GlobalStyle = createGlobalStyle`
overflow-x: hidden;
scroll-behavior: smooth;
&::-webkit-scrollbar {
background-color: ${props => props.theme.colors.mediumGray};
background-color: ${(props) => props.theme.colors.mediumGray};
width: 10px;
}
&::-webkit-scrollbar-thumb {
Expand Down
30 changes: 21 additions & 9 deletions src/components/common/header/index.jsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
import HeaderImage from "../../../images/Header.png";
import LogoImage from "../../../images/Logo.png";
import styled from "styled-components";
import { useNavigate } from "react-router-dom";
import { useNavigate, useLocation } from "react-router-dom";
const Header = (props) => {
const { title, description } = props;
const location = useLocation();
const navigate = useNavigate();
const menu = [
{ menu: "메인페이지", url: "/student" },
{ menu: "모집공고", url: "/student/notice" },
{ menu: "기업 목록", url: "/student/company" },
// { menu: "로그인", url: "/student/login" },
// { menu: "회원가입", url: "/student/signup" },
];
const menu =
location.pathname.slice(0, 8) === "/student"
? [
{ menu: "메인페이지", url: "/student" },
{ menu: "모집공고", url: "/student/notice" },
{ menu: "기업 목록", url: "/student/company" },
// { menu: "로그인", url: "/student/login" },
// { menu: "회원가입", url: "/student/signup" },
]
: [];
const Gohome =
location.pathname.slice(0, 8) === "/student"
? "/student"
: location.pathname.slice(0, 8) === "/company"
? "/company/list"
: location.pathname.slice(0, 8) === "/teacher"
? "/teacher"
: "/";
return (
<>
<HeaderImg>
<Nav>
<LogoImg
onClick={() => {
navigate("/");
navigate(`${Gohome}`);
}}
src={LogoImage}
alt="로고이미지입니다."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const SelectModal = () => {
} else {
Notice({ state: "success", message: "정상적으로 처리되었습니다." });
dispatch(value(props));
window.scrollTo(0, 300);
dispatch(stateModal(false));
}
}
Expand Down
24 changes: 19 additions & 5 deletions src/components/pages/teacherPage/company/list/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const ShowCompany = () => {
}
setArr(ad);
}
window.scrollTo(0, 300);
}, [count, data]);
useEffect(() => {
if (data?.last && data.totalPages - 1 > count) {
Expand Down Expand Up @@ -91,7 +92,7 @@ const ShowCompany = () => {
{data.content.map((user, i) => (
<Libox onMouseDown={() => PreFetching(user.companyNumber)}>
<Box>
<Title>{count * 5 + (i + 1)}</Title>
<Title>{count * 8 + (i + 1)}</Title>
<ImgDiv>
<Img
src={
Expand All @@ -101,10 +102,9 @@ const ShowCompany = () => {
style={{ width: "50px", height: "50px" }}
/>
</ImgDiv>
<Category>
<Category2>
<div>{user.companyName}</div>
<div>회사명</div>
</Category>
</Category2>
<Category>
<div>email</div>
<div>{user.contactorEmail}</div>
Expand Down Expand Up @@ -302,10 +302,24 @@ const Category = styled.div`
}
}
`;
const Category2 = styled.div`
display: inline-flex;
align-items: center;
gap: 20px;
margin-right: 50px;
div {
width: 250px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font: 700 normal 24px "NanumGothic", sans-serif;
color: ${(props) => props.theme.colors.blue};
}
`;
const ButtonProps = styled.div`
position: relative;
border-radius: 100px;
left: 300px;
left: 200px;
text-align: center;
cursor: pointer;
background-color: ${(props) => props.theme.colors.blue};
Expand Down
3 changes: 2 additions & 1 deletion src/components/pages/teacherPage/company/search/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const SearchProps = () => {
}
setArr(ad);
}
window.scrollTo(0, 300);
}, [count, data]);
useEffect(() => {
if (data?.last && data.totalPages - 1 > count) {
Expand Down Expand Up @@ -136,7 +137,7 @@ const SearchProps = () => {
</Libox>
))}
</Ulbox>
<Ul top={100 * (8 - data.content.length) + 50}>
<Ul top={-100}>
<Li>
<Button onClick={() => setCount(0)}>First Page</Button>
</Li>
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/teacherPage/list/wait/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const Wait = ({ path }) => {
)}
</Ulbox>
</TableProps>
<Ul top={-300}>
<Ul top={-280}>
<Li>
<Button onClick={() => setCount(0)}>First Page</Button>
</Li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,20 +198,19 @@ const StatusManageComponent = ({ props }) => {
{status === "loading" ? (
<>
<Table>
<Ulbox></Ulbox>
<Ulbox>지원자가 없습니다.</Ulbox>
</Table>
</>
) : status === "error" ? (
<>
<Table>
<Ulbox></Ulbox>
<Ulbox>지원자가 없습니다.</Ulbox>
</Table>
</>
) : (
<>
<Table>
<Ulbox>
{data === [] ? <></> : <></>}
{data.map((user, i) => (
<Libox>
<Box>
Expand Down

0 comments on commit abd1c87

Please sign in to comment.