forked from milzipmoza-developers/tecobrary-admin-client-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[milzipmoza-developers#2] refactor - 대시보드 리펙토링
- Loading branch information
1 parent
10a1cd6
commit de9e6f0
Showing
2 changed files
with
34 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) => ( | ||
<ContentContainer> | ||
<Row> | ||
<Col sm={8}> | ||
<LongTermRentHistoryCard histories={histories}/> | ||
</Col> | ||
<Col sm={4}> | ||
<LoginUserProfileCard userName="루피" userEmail="[email protected]"/> | ||
</Col> | ||
</Row> | ||
<Row style={{marginTop: '24px'}}> | ||
<Col sm={12}> | ||
<WishBookSummaryCard wishBooks={wishBooks}/> | ||
</Col> | ||
</Row> | ||
</ContentContainer> | ||
); | ||
|
||
export default DashBoardTemplate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ( | ||
<AppBarContainer isLoggedIn={true}> | ||
<ContentContainer> | ||
<Row> | ||
<Col sm={8}> | ||
<LongTermRentHistoryCard histories={longTerms}/> | ||
</Col> | ||
<Col sm={4}> | ||
<LoginUserProfileCard userName="루피" userEmail="[email protected]"/> | ||
</Col> | ||
</Row> | ||
<Row style={{marginTop: '24px'}}> | ||
<Col sm={12}> | ||
<WishBookSummaryCard wishBooks={wishBooks}/> | ||
</Col> | ||
</Row> | ||
</ContentContainer> | ||
<DashBoardTemplate histories={longTerms} wishBooks={wishBooks}/> | ||
</AppBarContainer> | ||
); | ||
}; | ||
|