-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #508 from Akanimorex/feat/dashboardLayout
feat:unified dashboard Layout
- Loading branch information
Showing
11 changed files
with
1,165 additions
and
837 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,53 @@ | ||
import React from 'react'; | ||
import Sidebar from 'components/layout/sidebar/Sidebar'; | ||
import './DashboardLayout.css'; | ||
|
||
import clockIcon from 'assets/icons/clock.svg'; | ||
import computerIcon from 'assets/icons/computer-icon.svg'; | ||
import depositIcon from 'assets/icons/deposit.svg'; | ||
import withdrawIcon from 'assets/icons/withdraw.svg' | ||
|
||
|
||
|
||
const dashboardItems = [ | ||
{ | ||
id: 'dashboard', | ||
name: 'Dashboard', | ||
link: '/dashboard', | ||
icon: computerIcon, | ||
}, | ||
{ | ||
id: 'position_history', | ||
name: 'Position History', | ||
link: '/dashboard/position-history', | ||
icon: clockIcon, | ||
}, | ||
{ | ||
id: 'deposit', | ||
name: 'Add Deposit', | ||
link: '/dashboard/deposit', | ||
icon: depositIcon, | ||
}, | ||
{ | ||
id: 'withdraw', | ||
name: 'Withdraw All', | ||
link: '/dashboard/withdraw', | ||
icon: withdrawIcon, | ||
} | ||
]; | ||
|
||
export default function DashboardLayout({ children, title = 'zkLend Position' }) { | ||
return ( | ||
<div className="dashboard"> | ||
<Sidebar items={dashboardItems} /> | ||
<div className="dashboard-wrapper"> | ||
<div className="dashboard-container"> | ||
<h1 className="dashboard-title">{title}</h1> | ||
<div className="dashboard-content"> | ||
{children} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
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
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
Oops, something went wrong.