Skip to content

Commit

Permalink
Merge pull request #16 from karrotmvp/dev
Browse files Browse the repository at this point in the history
🚀 ver 1.0.2
  • Loading branch information
Changyu-Ryou authored Nov 2, 2021
2 parents 735737e + 69db11b commit 1de96ed
Show file tree
Hide file tree
Showing 31 changed files with 1,194 additions and 1,134 deletions.
3 changes: 0 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"parser": "@typescript-eslint/parser",
"plugins": ["react", "@typescript-eslint", "react-hooks", "import", "prettier"],
"extends": [

"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
Expand All @@ -12,15 +11,13 @@
"@typescript-eslint/camelcase": "off",
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],
"@typescript-eslint/no-unused-vars": [2, { "args": "none" }],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"mjs": "never",
"jsx": "never",
"ts": "never",
Expand Down
16 changes: 8 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { css } from '@emotion/css';
import { Navigator, Screen } from '@karrotframe/navigator';
import { getAnalytics, logEvent } from 'firebase/analytics';

import LandingPage from './components/LandingPage';
import MeetingDetailPage from './components/MeetingDetailPage';
import MeetingSuggestionPage from './components/MeetingSuggestionPage';
import NotFoundPage from './components/NotFountPage';
import NotServiceRegionPage from './components/NotServiceRegionPage';
import OnBoardPage from './components/OnBoardPage';
import RedirectPage from './components/RedirectPage';
import ReservationPage from './components/ReservationPage';
import Auth from './hoc/Auth';
import LandingPage from './pages/LandingPage/LandingPage';
import MeetingDetailPage from './pages/MeetingDetailPage/MeetingDetailPage';
import MeetingSuggestionPage from './pages/MeetingSuggestionPage/MeetingSuggestionPage';
import NotFoundPage from './pages/NotFountPage/NotFoundPage';
import NotServiceRegionPage from './pages/NotServiceRegionPage/NotServiceRegionPage';
import OnBoardPage from './pages/OnBoardPage/OnBoardPage';
import RedirectPage from './pages/RedirectPage/RedirectPage';
import ReservationPage from './pages/ReservationPage/ReservationPage';
import { app } from './util/firebase';
import mini from './util/mini';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@ import React, { ReactElement, useCallback, useEffect, useState } from 'react';
import styled from '@emotion/styled';
import moment from 'moment';

import { COLOR } from '../../constant/color';
import useInterval from '../../hook/useInterval';
import { getRemainMilliSec } from '../../util/utils';
import { COLOR } from '../../../constant/color';
import useInterval from '../../../hook/useInterval';
import { getRemainMilliSec } from '../../../util/utils';

const TimerStyle = styled.div`
display: flex;
flex-direction: row;
margin-bottom: 0.4rem;
color: ${COLOR.ORANGE};
`;
interface Props {
start_time: string;
end_time: string;
Expand Down Expand Up @@ -71,4 +65,11 @@ function CurrMeetingTimer({ start_time, end_time, date }: Props): ReactElement {
);
}

const TimerStyle = styled.div`
display: flex;
flex-direction: row;
margin-bottom: 0.4rem;
color: ${COLOR.ORANGE};
`;

export default CurrMeetingTimer;
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import styled from '@emotion/styled';
import { useNavigator } from '@karrotframe/navigator';
import { MeetingList } from 'meeting';

import { COLOR } from '../../constant/color';
import CurrMeetingTimer from '../Timer/CurrMeetingTimer';
import { COLOR } from '../../../../constant/color';
import CurrMeetingTimer from '../CurrMeetingTimer';

interface Props {
data: MeetingList;
Expand All @@ -23,6 +23,40 @@ interface ThumbnailProps {
total?: number;
}

function CurrMeetingCard({ idx, data, total }: Props): ReactElement {
const { push } = useNavigator();

const onClickCardHandler = useCallback(() => {
push(`/meetings/${data.id}`);
}, [data.id, push]);

return (
<MeetingCardWrapper
className="meeting-card"
live_status={data.live_status}
idx={idx}
total={total}
onClick={onClickCardHandler}
>
<ImageWrapper total={total}>
<LiveTag>진행중</LiveTag>
<Thumbnail src={data.image} />
</ImageWrapper>
<ContentsWrapper>
<InfoWrapper>
<CurrMeetingTimer
date={data.date}
start_time={data.start_time}
end_time={data.end_time}
/>
<Title className="title">{data.title}</Title>
</InfoWrapper>
<Button>모임 정보 보러가기</Button>
</ContentsWrapper>
</MeetingCardWrapper>
);
}

const MeetingCardWrapper = styled.div<WrapperProps>`
margin: ${({ total }) => (total === 1 ? '0 1.6rem' : '0')};
width: ${({ total }) => (total === 1 ? '100%' : '25.8rem')};
Expand Down Expand Up @@ -114,38 +148,4 @@ const Button = styled.div`
align-items: center;
`;

function CurrMeetingCard({ idx, data, total }: Props): ReactElement {
const { push } = useNavigator();

const onClickCardHandler = useCallback(() => {
push(`/meetings/${data.id}`);
}, [data.id, push]);

return (
<MeetingCardWrapper
className="meeting-card"
live_status={data.live_status}
idx={idx}
total={total}
onClick={onClickCardHandler}
>
<ImageWrapper total={total}>
<LiveTag>진행중</LiveTag>
<Thumbnail src={data.image} />
</ImageWrapper>
<ContentsWrapper>
<InfoWrapper>
<CurrMeetingTimer
date={data.date}
start_time={data.start_time}
end_time={data.end_time}
/>
<Title className="title">{data.title}</Title>
</InfoWrapper>
<Button>모임 정보 보러가기</Button>
</ContentsWrapper>
</MeetingCardWrapper>
);
}

export default CurrMeetingCard;
Loading

0 comments on commit 1de96ed

Please sign in to comment.