Skip to content

Commit

Permalink
Merge pull request #123 from Together42/develop
Browse files Browse the repository at this point in the history
ci: board와 timeline api 임시 삭제에 대응합니다
  • Loading branch information
Jiwon-Woo authored Nov 23, 2023
2 parents 7820a7f + 33962c0 commit f688a90
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 40 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
AWS_BUCKET_REGION: ${{ secrets.AWS_BUCKET_REGION }}
AWS_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }}
DEPLOY_ADR: ${{ secrets.DEPLOY_ADR }}
IMAGE_SERVER_ADR: ${{ secrets.IMAGE_SERVER_ADR }}

strategy:
matrix:
Expand Down
4 changes: 2 additions & 2 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import EventAttend from '@result/EventAttend';

const Main = loadable(() => import('@main/index'));
const Auth = loadable(() => import('@auth/index'));
const Review = loadable(() => import('@review/routes'));
// const Review = loadable(() => import('@review/routes'));
const EventLog = loadable(() => import('@main/Log'));
const Result = loadable(() => import('@result/index'));
const Timeline = loadable(() => import('@timeline/index'));
Expand Down Expand Up @@ -40,7 +40,7 @@ const App = () => {
<Route path="/event/match" element={<Result />} />
<Route path="/event/attend/:eventId" element={<EventAttend />} />
<Route path="/rotation/*" element={<Rotation />} />
<Route path="/review/*" element={<Review />} />
{/* <Route path="/review/*" element={<Review />} /> */}
<Route path="/2022-timeline/" element={<Timeline />} />
<Route path="/auth" element={<Auth />} />
</Routes>
Expand Down
23 changes: 4 additions & 19 deletions src/components/Timeline/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
import React, { useEffect, useState } from 'react';
import React from 'react';
import { Chrono } from 'react-chrono';
import '@css/Timeline/Home.scss';
import brush from '@img/paint-brush.png';
import items from './items';
import axios from 'axios';
import getAddress from '@globalObj/function/getAddress';
import images from './images';

export const Home = () => {
const [ImgArr, setImgArr] = useState(null);

const getImg = () => {
axios
.get(`${getAddress()}/api/timeline`)
.then((res) => res.data.img)
.then((res2) => setImgArr(res2))
.catch((err) => console.log(err));
};

useEffect(() => {
getImg();
}, []);

return (
<div className="timeline--wrapper">
<div className="timeline--title">
Expand All @@ -43,8 +28,8 @@ export const Home = () => {
}}
fontSizes={{ cardSubtitle: '0.85rem', cardText: '0.8rem', cardTitle: '1rem', title: '1.3rem' }}
>
{ImgArr
? ImgArr.map((elem) => (
{images
? images.map((elem) => (
<div>
<img className="timeline--img" src={elem['url']} alt={elem['url']}></img>
</div>
Expand Down
86 changes: 86 additions & 0 deletions src/components/Timeline/images.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
export default [
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679659836_01_gather.png`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679671548_02_category.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679697911_03_labeling.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679742370_04_goods.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679749222_05_proto.png`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679755169_06_tidy.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679761120_07_chinba1.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679766734_08_chinba2.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679772445_09_sixot.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679777759_10_sixchinba.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679783239_11_full.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679788490_12_all.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679794687_13_emoji.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679800445_14_chinbasite.png`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679805503_15_second.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679810072_16_chinsta.png`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679814983_17_sooyo.png`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679819752_18_sevenot.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679824314_19_jip.png`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679829472_20_achievement.png`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679833666_21_newbook.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679837852_22_third.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679842557_23_broken.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679847660_24_white.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679852502_25_eightot.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679858083_26_imsi.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679861787_27_inno.jpg`,
},
{
url: `${process.env.IMAGE_SERVER_ADR}/timeline/1672679865836_28_review.jpg`,
},
];
20 changes: 10 additions & 10 deletions src/components/utils/MobileNavber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ function MobileNavber() {
}
};

const onClickAuthReview = () => {
setModalOpen((prev) => !prev);
if (getToken()) {
navigate('/review/');
} else {
alert('로그인을 먼저 해주세요!');
navigate('/auth');
}
};
// const onClickAuthReview = () => {
// setModalOpen((prev) => !prev);
// if (getToken()) {
// navigate('/review/');
// } else {
// alert('로그인을 먼저 해주세요!');
// navigate('/auth');
// }
// };

const onClickAuthRotation = () => {
setModalOpen((prev) => !prev);
Expand Down Expand Up @@ -86,7 +86,7 @@ function MobileNavber() {
</Link>
<span onClick={onClickAuthRotation}>사서 로테 신청</span>
<span onClick={onClickRotationCalendar}>사서 달력</span>
<span onClick={onClickAuthReview}>친스타그램</span>
{/* <span onClick={onClickAuthReview}>친스타그램</span> */}
<span onClick={onClickAuthTimeline}>집현전실록</span>
{getToken() ? (
<span onClick={onClickLogOut}>로그아웃</span>
Expand Down
18 changes: 9 additions & 9 deletions src/components/utils/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ function Navbar() {
}
};

const onClickAuthReview = () => {
if (getToken()) {
navigate('/review/');
} else {
alert('로그인을 먼저 해주세요!');
navigate('/auth');
}
};
// const onClickAuthReview = () => {
// if (getToken()) {
// navigate('/review/');
// } else {
// alert('로그인을 먼저 해주세요!');
// navigate('/auth');
// }
// };

const onClickEventCreate = () => {
navigate('/');
Expand Down Expand Up @@ -84,7 +84,7 @@ function Navbar() {
<button onClick={onClickCalendar}>달력보기</button>,
]}
/>
<span onClick={onClickAuthReview}>친스타그램</span>
{/* <span onClick={onClickAuthReview}>친스타그램</span> */}
<span onClick={onClickAuthTimeline}>집현전실록</span>
{getToken() ? <span onClick={onClickLogOut}>로그아웃</span> : <Link to={`/auth`}>로그인하기</Link>}
</div>
Expand Down

0 comments on commit f688a90

Please sign in to comment.