Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DetailPage D-day 모바일 디자인 수정 #117

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
13 changes: 9 additions & 4 deletions src/components/pages/ZaboPage/ZaboDetailPage.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'moment/locale/ko';

import React, { useCallback, useEffect } from 'react';
import PropTypes from 'prop-types';
import { Link, useHistory, useRouteMatch } from 'react-router-dom';
Expand Down Expand Up @@ -119,7 +121,7 @@ const ZaboDetailPage = props => {
const schedule = schedules[0];
const timePast = getLabeledTimeDiff (createdAt, 60, 60, 6, 0);
const due = schedule ? moment (schedule.startAt).diff (moment (), 'days') : 0;
const dueFormat = schedule && moment (schedule.startAt).format ('MM/DD h:mm');
const dueFormat = schedule && moment (schedule.startAt).format ('MM월 DD일 (ddd) h:mm');
const stats = [{
type: 'like',
count: likesCount,
Expand Down Expand Up @@ -186,10 +188,13 @@ const ZaboDetailPage = props => {
{schedule && (
<CategoryW>
<button>{schedule.eventType}</button>
<h3>{schedule.title}</h3>
<div className="schedule-date">
{dueFormat}
<div className="container">
<h3 className="title">{schedule.title}</h3>
<div className="schedule-date">
{dueFormat}
</div>
</div>

</CategoryW>
)}
<section className="contents">
Expand Down
16 changes: 13 additions & 3 deletions src/components/pages/ZaboPage/ZaboPage.styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ ZaboPageWrapper.Recommend = styled.section`
}
`;

// TODO: temporal code - need to change
export const CategoryW = styled.section`
width: 99%;
height: 66px;
Expand All @@ -236,8 +235,13 @@ export const CategoryW = styled.section`
border: 0;
margin-right: 8px;
padding: 3px 8px;
white-space: nowrap;
}
h3 {
.container{
display : flex;
flex-direction : row;
}
.title {
color: #363636;
font-size: 16px;
font-weight: bold;
Expand All @@ -251,10 +255,16 @@ export const CategoryW = styled.section`
color: #797979;
}
@media (max-width: 640px) {
flex-direction: column;
flex-direction: row;
align-items: flex-start;
height: 100%;
padding: 14px 20px;
button, h3 { margin-bottom: 5px }
.container{
flex-direction : column;
}
.schedule-date{
text-align: left;
}
}
`;