From de9e6f0b7222ebcf17ea4a3508979db5222d22db Mon Sep 17 00:00:00 2001 From: thedevluffy Date: Wed, 5 Feb 2020 22:26:59 +0900 Subject: [PATCH] =?UTF-8?q?[#2]=20refactor=20-=20=EB=8C=80=EC=8B=9C?= =?UTF-8?q?=EB=B3=B4=EB=93=9C=20=EB=A6=AC=ED=8E=99=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/templates/DashBoardTemplate.tsx | 32 ++++++++++++++++++++++ pages/dashboard/index.tsx | 22 ++------------- 2 files changed, 34 insertions(+), 20 deletions(-) create mode 100644 components/templates/DashBoardTemplate.tsx diff --git a/components/templates/DashBoardTemplate.tsx b/components/templates/DashBoardTemplate.tsx new file mode 100644 index 0000000..d6d0495 --- /dev/null +++ b/components/templates/DashBoardTemplate.tsx @@ -0,0 +1,32 @@ +import ContentContainer from "../organisms/containers/ContentContainer"; +import {Col, Row} from "react-bootstrap"; +import LongTermRentHistoryCard from "../organisms/LongTermRentHistoryCard"; +import LoginUserProfileCard from "../organisms/LoginUserProfileCard"; +import WishBookSummaryCard from "../organisms/WishBookSummaryCard"; +import * as React from "react"; +import {IHistory, IWishBook} from "../../pages/dashboard"; + +interface IProps { + histories: IHistory[]; + wishBooks: IWishBook[]; +} + +const DashBoardTemplate = ({histories, wishBooks}: IProps) => ( + + + + + + + + + + + + + + + +); + +export default DashBoardTemplate; \ No newline at end of file diff --git a/pages/dashboard/index.tsx b/pages/dashboard/index.tsx index b9f0c48..2a9ca89 100644 --- a/pages/dashboard/index.tsx +++ b/pages/dashboard/index.tsx @@ -1,10 +1,6 @@ import * as React from "react"; import AppBarContainer from "../../components/organisms/containers/AppBarContainer"; -import ContentContainer from "../../components/organisms/containers/ContentContainer"; -import {Col, Row} from "react-bootstrap"; -import LongTermRentHistoryCard from "../../components/organisms/LongTermRentHistoryCard"; -import LoginUserProfileCard from "../../components/organisms/LoginUserProfileCard"; -import WishBookSummaryCard from "../../components/organisms/WishBookSummaryCard"; +import DashBoardTemplate from "../../components/templates/DashBoardTemplate"; const longTerms: IHistory[] = [ { @@ -91,21 +87,7 @@ export interface IWishBook { const Index = () => { return ( - - - - - - - - - - - - - - - + ); };