Skip to content

Commit

Permalink
💄Dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
noeypatt committed Apr 5, 2020
1 parent 7b4f086 commit 7bd9b7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
11 changes: 1 addition & 10 deletions components/layout/dashboard.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
import React, { useState } from 'react'
import NavBar from './nav'
import { useMediaQuery } from 'react-responsive'
import Sidebar from './sidebar'


const Dashboard = props => {

const [status, setStatus] = useState(false)
const isSmallScreen = useMediaQuery({ maxDeviceWidth: 575.98 })
const isSmallScreen = useMediaQuery({ maxDeviceWidth: 1023 })

const [main, setMain] = useState(
[
{ name: "เมนู" },
// { name: "ข้อมูลด้านสุขภาพ", href: "/main/hospital" },
// { name: "ข้อมูลด้านสังคม", href: "/main/social" },
// { name: "ข้อมูลด้านเศรษฐกิจ", href: "/main/economy" },
// { name: "ข้อมูลด้านการช่วยเหลือ", href: "/main/service" },

]
)

Expand All @@ -39,13 +32,11 @@ const Dashboard = props => {
else {
props.onStatusMain(true)
}
console.log(order);
}

return (
<React.Fragment>
<NavBar name="main" tab={isSmallScreen ? sidebar : main} confirm={onConfirm} status={status} />
{/* <Sidebar status={status} /> */}
</React.Fragment>
)
}
Expand Down
4 changes: 2 additions & 2 deletions components/layout/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ const NavBar = props => {
{
tab.map((item, indexs) => {
return (
<Link key={indexs} href={item.href}>
<a key={indexs} href={item.href}>
<p >{item.name}</p>
</Link>
</a>
)
})
}
Expand Down

1 comment on commit 7bd9b7b

@vercel
Copy link

@vercel vercel bot commented on 7bd9b7b Apr 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.