Skip to content

Commit

Permalink
npm run format and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueHorn07 committed Jun 23, 2024
1 parent f37d78c commit 0c40c51
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { ResponsiveBar } from '@nivo/bar';

import { PoPoAxios } from '@/utils/axios.instance';

const NewReservationBar = ({ year }) => {
const NewPlaceReservationBar = ({ year }) => {
const [barData, setBarData] = useState([]);

useEffect(() => {
PoPoAxios.get(
`/statistics/reservation?start=${year}01&end=${year + 1}01`,
`/statistics/reservation/place?start=${year}01&end=${year + 1}01`,
).then((res) => {
// process data format
const barData = [];
Expand Down Expand Up @@ -37,4 +37,4 @@ const NewReservationBar = ({ year }) => {
);
};

export default NewReservationBar;
export default NewPlaceReservationBar;
18 changes: 13 additions & 5 deletions pages/board/calendar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,31 @@ const AnnouncementPage = ({ calendarList }) => {
return (
<BoardLayout>
<h3>학사 일정</h3>
<div style={{ marginBottom: '1rem', display: 'flex', justifyContent: 'space-between' }}>
<div
style={{
marginBottom: '1rem',
display: 'flex',
justifyContent: 'space-between',
}}
>
<Link href={'/board/calendar/create'}>
<Button>학사일정 추가</Button>
</Link>

<Button
href={"https://www.postech.ac.kr/academics/academic-info/academic-calendar/"}
style={{backgroundColor: 'rgb(200, 1, 80)', color: 'white'}}
href={
'https://www.postech.ac.kr/academics/academic-info/academic-calendar/'
}
style={{ backgroundColor: 'rgb(200, 1, 80)', color: 'white' }}
>
공식 학사일정 확인하기
</Button>
</div>

<Message>학사일정은 시작 일자로 정렬되어 표시됩니다!</Message>
<Message>
만약 이틀 이상 진행되는 일정이라면 <b>시작/종료</b> 일정으로 분리해주세요.{' '}
<br />
만약 이틀 이상 진행되는 일정이라면 <b>시작/종료</b> 일정으로
분리해주세요. <br />
(ex. 2학기 수강 신청 (05.20 ~ 05.28) → 2학기 수강신청 수강신청
시작(05.20) / 2학기 수강신청 마감(05.28))
</Message>
Expand Down
25 changes: 17 additions & 8 deletions pages/statistics/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react';
import dynamic from 'next/dynamic';
import { Dropdown, List } from 'semantic-ui-react';
import { Dropdown } from 'semantic-ui-react';
import moment from 'moment';

import LayoutWithAuth from '@/components/layout/layout.auth.with';
Expand All @@ -10,8 +10,12 @@ const NewUserBar = dynamic(
() => import('../../components/statistics/new-user.bar'),
{ ssr: false },
);
const NewReservationBar = dynamic(
() => import('../../components/statistics/new-reservation.bar'),
const NewPlaceReservationBar = dynamic(
() => import('../../components/statistics/new-place-reservation.bar'),
{ ssr: false },
);
const NewEquipmentReservationBar = dynamic(
() => import('../../components/statistics/new-place-reservation.bar'),
{ ssr: false },
);

Expand Down Expand Up @@ -50,20 +54,25 @@ const StatisticsPage = () => {
}}
/>
</div>

<h3>신규 유저</h3>
<div style={{ height: 360 }}>
<NewUserBar year={year} />
</div>

<hr />

<h3>신규 장소 예약</h3>
<div style={{ height: 360 }}>
<NewReservationBar year={year} />
<NewPlaceReservationBar year={year} />
</div>

<hr />
<h3>ToDo List 🚀</h3>
<List as="ul">
<List.Item as="li">일일 활성 유저 (Daily Active User)</List.Item>
</List>

<h3>신규 장비 예약</h3>
<div style={{ height: 360 }}>
<NewEquipmentReservationBar year={year} />
</div>
</LayoutWithAuth>
);
};
Expand Down

0 comments on commit 0c40c51

Please sign in to comment.