Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ui #1

Open
wants to merge 192 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
7e9d123
:zap:Loading
noeypatt Feb 25, 2020
a609b1a
:zap:Loading
noeypatt Feb 25, 2020
c74832b
:bug:Map
noeypatt Feb 25, 2020
72a031c
:bug:Map
noeypatt Feb 25, 2020
1f4bc18
:sparkles:material-ui&react-responsive && :lipstick: NavBar
noeypatt Feb 25, 2020
6aedfed
:bug:css error
noeypatt Feb 25, 2020
397d1eb
:lipstick:.btn.hamberger
noeypatt Feb 25, 2020
74f6221
:bug:css error
noeypatt Feb 25, 2020
1e480f7
:zap:Loading
noeypatt Feb 25, 2020
d7cb1ab
:bug:css error
noeypatt Feb 25, 2020
f5e806d
:fire:nav-index
noeypatt Feb 27, 2020
3c7ca02
:fire:nav-index
noeypatt Feb 27, 2020
3c3802e
:lipstick:Main
noeypatt Feb 28, 2020
cb28e42
:lipstick:Main
noeypatt Feb 28, 2020
68dbb0b
:lipstick:Navbar
noeypatt Mar 1, 2020
499057f
:lipstick:Navbar
noeypatt Mar 1, 2020
84bc32b
:lipstick:Cover
noeypatt Mar 1, 2020
362447e
:lipstick:Cover
noeypatt Mar 2, 2020
949c04e
:lipstick:Cover
noeypatt Mar 2, 2020
590d1a1
:lipstick:Cover
noeypatt Mar 2, 2020
d053af7
:lipstick:Cover
noeypatt Mar 2, 2020
151fa1e
:lipstick:About&Info
noeypatt Mar 2, 2020
b74cdf0
:lipstick:About&Info
noeypatt Mar 2, 2020
12e9915
:lipstick:About&Info
noeypatt Mar 2, 2020
52e4dfe
:lipstick:About&Info
noeypatt Mar 2, 2020
26a6aa6
:lipstick:About&Info
noeypatt Mar 2, 2020
46574b3
:bug:css
noeypatt Mar 2, 2020
00ffa10
:bug:css
noeypatt Mar 2, 2020
ba1545d
:bug:css
noeypatt Mar 2, 2020
c8d9fdd
:bug:css
noeypatt Mar 2, 2020
c3b275a
:bug:css
noeypatt Mar 3, 2020
ce8c166
:bug:css
noeypatt Mar 3, 2020
01571d9
:bug:css => resuit
noeypatt Mar 3, 2020
b578cf3
:lipstick:Sidebar
noeypatt Mar 4, 2020
b6f898c
:lipstick:Sidebar
noeypatt Mar 4, 2020
0fc5692
:lipstick:Sidebar
noeypatt Mar 4, 2020
c70b8d3
:lipstick:Sidebar
noeypatt Mar 4, 2020
23d5292
:bug:NavBar
noeypatt Mar 5, 2020
ec9c79f
:bug:NavBar
noeypatt Mar 5, 2020
44bb89e
:bug:NavBar
noeypatt Mar 5, 2020
512001e
:lipstick:Info
noeypatt Mar 7, 2020
bc26519
:lipstick:Agency
noeypatt Mar 7, 2020
c9e89fc
:bug:Map
noeypatt Mar 7, 2020
f28dedc
:bug:Map
noeypatt Mar 7, 2020
f2a3814
:bug:
noeypatt Mar 7, 2020
32514e4
:lipstick:Info
noeypatt Mar 8, 2020
d8e836e
:lipstick:Footer
noeypatt Mar 8, 2020
92cb1bb
:bug:content-data
noeypatt Mar 8, 2020
80a187d
:fire:allow
noeypatt Mar 8, 2020
80c92ea
:bug:css
noeypatt Mar 8, 2020
47e1dd2
:fire:main
noeypatt Mar 8, 2020
cd1ec65
:lipstick:Main
noeypatt Mar 8, 2020
ced1344
:lipstick:Agency
noeypatt Mar 9, 2020
d55af72
:lipstick:Agency
noeypatt Mar 9, 2020
f89b469
:bug:api
noeypatt Mar 9, 2020
282417a
:bug: reload map charts
noeypatt Mar 11, 2020
2449296
:bug: 401
noeypatt Mar 11, 2020
08da6f4
:bug:btn cover
noeypatt Mar 13, 2020
9d98805
:fire:&&:bug:401
noeypatt Mar 15, 2020
43443e0
:fire:&&:bug:401
noeypatt Mar 15, 2020
05c5a8f
:lipstick:main
noeypatt Mar 15, 2020
2dbaa0e
:lipstick:main
noeypatt Mar 15, 2020
86fe7e8
:lipstick:main
noeypatt Mar 15, 2020
eb1dca9
:sparkles:AntDesign-Progress
noeypatt Mar 15, 2020
2d03d1d
:lipstick:main-Progress
noeypatt Mar 15, 2020
a2ec578
:lipstick:index-Agency
noeypatt Mar 15, 2020
1994133
:lipstick:Agency&&Info
noeypatt Mar 15, 2020
05d56f4
:lipstick:Sidebar-main
noeypatt Mar 15, 2020
65f30ca
:lipstick:sidebar
noeypatt Mar 16, 2020
7bc208f
:lipstick:Charts
noeypatt Mar 16, 2020
0c2d856
:fire:
noeypatt Mar 16, 2020
51af5df
:fire:
noeypatt Mar 16, 2020
39f5914
loading => main
noeypatt Mar 17, 2020
d3fbb9c
:lipstick:main
noeypatt Mar 17, 2020
d9db3ab
:lipstick:main
noeypatt Mar 17, 2020
1c94e0a
:lipstick:index
noeypatt Mar 17, 2020
dcec94c
:lipstick:index
noeypatt Mar 17, 2020
6a9d9f5
:recycle:chart
noeypatt Mar 18, 2020
388e2fc
:lipstick:about
noeypatt Mar 18, 2020
2d86a41
:lipstick:agency
noeypatt Mar 18, 2020
19573a7
:lipstick:info
noeypatt Mar 18, 2020
a37faa7
:bug:Navbar
noeypatt Mar 18, 2020
6091e3a
:bug:Navbar
noeypatt Mar 19, 2020
9fd54ee
:fire:Footer/layout
noeypatt Mar 27, 2020
07d2e1f
:lipstick:Footer
noeypatt Mar 27, 2020
e774521
:lipstick:Agency
noeypatt Mar 27, 2020
d599eef
:bug:CSS&&ERR429
noeypatt Mar 27, 2020
3cd0e21
:lipstick:About
noeypatt Mar 28, 2020
4ad622c
:sparkles:hover.css
noeypatt Mar 28, 2020
abb2dd1
:lipstick:About
noeypatt Mar 28, 2020
142820c
:lipstick:Navbar
noeypatt Mar 28, 2020
cf8197f
:lipstick:
noeypatt Mar 28, 2020
88e5181
:lipstick:
noeypatt Mar 28, 2020
5e8955b
:lipstick:Society
noeypatt Mar 28, 2020
e196f01
:lipstick:Nav
noeypatt Mar 29, 2020
8a88939
:lipstick:About /index
noeypatt Mar 29, 2020
d6ccd09
:fire:cover /componen
noeypatt Mar 29, 2020
872d1d4
:lipstick:Nav
noeypatt Mar 29, 2020
554f66e
:lipstick:About /index
noeypatt Mar 29, 2020
7a96d19
:lipstick:About /index
noeypatt Mar 29, 2020
33cd8d6
:lipstick:About /index
noeypatt Mar 29, 2020
d0e8fde
:lipstick:About /index
noeypatt Mar 29, 2020
bc7f81a
:lipstick:About /index
noeypatt Mar 29, 2020
9d6f2f2
:lipstick:About /index
noeypatt Mar 30, 2020
2c7e773
:lipstick:Society /index
noeypatt Mar 30, 2020
70f6a60
:lipstick:Society /index
noeypatt Mar 30, 2020
1c8fdd0
:lipstick:About&&Allowance /index
noeypatt Mar 30, 2020
c7e3ec8
:lipstick:About
noeypatt Mar 30, 2020
e4c2942
:remove:
noeypatt Mar 30, 2020
a80ae78
:lipstick:Allowance
noeypatt Mar 31, 2020
41eadf6
:lipstick:
noeypatt Mar 31, 2020
7ee6601
:lipstick:
noeypatt Mar 31, 2020
dab558c
:lipstick:Allowance
noeypatt Mar 31, 2020
531346b
:lipstick:Allowance
noeypatt Mar 31, 2020
e31d858
:lipstick:Contact
noeypatt Mar 31, 2020
a152363
:lipstick:Contact
noeypatt Mar 31, 2020
f01a8bc
:lipstick:Contact
noeypatt Mar 31, 2020
8e67fdc
:lipstick:Allowance
noeypatt Mar 31, 2020
0239c3b
:lipstick:Allowance
noeypatt Mar 31, 2020
4f24b6e
:lipstick:Contact
noeypatt Mar 31, 2020
a6f3794
:lipstick:Contact
noeypatt Mar 31, 2020
739f748
:lipstick:Contact
noeypatt Mar 31, 2020
af3faaa
:lipstick:Contact
noeypatt Mar 31, 2020
69af453
:lipstick:Contact
noeypatt Apr 1, 2020
a3e31bf
:lipstick:Contact
noeypatt Apr 1, 2020
a07f2e6
:lipstick:Contact
noeypatt Apr 1, 2020
25d7dfc
:lipstick:Contact
noeypatt Apr 1, 2020
2cfd1b7
:lipstick:Contact
noeypatt Apr 1, 2020
7c453dc
:lipstick:Contact
noeypatt Apr 1, 2020
4c60c1d
:lipstick:Contact
noeypatt Apr 1, 2020
98abedc
:lipstick:Allowance
noeypatt Apr 1, 2020
06f6cc5
:lipstick:About
noeypatt Apr 1, 2020
c0d4f68
:lipstick:Society
noeypatt Apr 1, 2020
9a3cb67
:lipstick:Allowance
noeypatt Apr 1, 2020
d791d0c
:lipstick:Contact
noeypatt Apr 1, 2020
04b8b38
:lipstick:Info
noeypatt Apr 1, 2020
0dc0d6a
:lipstick:Cover
noeypatt Apr 1, 2020
d64f332
:lipstick:about
noeypatt Apr 2, 2020
e64bdf0
:pencil2:
noeypatt Apr 2, 2020
96fddfc
:lipstick:Allowance
noeypatt Apr 2, 2020
d49e620
:lipstick:Nav
noeypatt Apr 2, 2020
e2d5605
:iphon:main
noeypatt Apr 2, 2020
f5e7b2f
:iphone:hospital
noeypatt Apr 2, 2020
4897219
:iphone:Social
noeypatt Apr 2, 2020
0ac5946
:iphone:Social
noeypatt Apr 2, 2020
db0cd83
:iphone:Service
noeypatt Apr 2, 2020
fe2ee2a
:lipstick:Nav
noeypatt Apr 2, 2020
f100bad
:lipstick:Nav
noeypatt Apr 5, 2020
602ffad
:lipstick:Empty && Drawer(Sidebar)
noeypatt Apr 5, 2020
ec0b757
:lipstick:Empty
noeypatt Apr 5, 2020
7b4f086
:lipstick:Drawer(Sidebar)
noeypatt Apr 5, 2020
7bd9b7b
:lipstick:Dashboard
noeypatt Apr 5, 2020
468f61b
text title MAin
noeypatt Apr 5, 2020
7accd9f
:lipstick:Nav
noeypatt Apr 6, 2020
807b84f
:tada:Nav-Sidebar
noeypatt Apr 7, 2020
08572a8
:bug:arrow-icon not link
noeypatt Apr 8, 2020
c47fbc7
:lipstick:Dashboard
noeypatt Apr 25, 2020
f98dcdf
:lipstick:Dashboard
noeypatt Apr 25, 2020
772218d
:lipstick:Dashboard
noeypatt Apr 25, 2020
67c1c50
:lipstick:Dashboard nav
noeypatt Apr 25, 2020
c088bc0
:lipstick:Dashboard nav
noeypatt Apr 25, 2020
5c2add5
:lipstick:Dashboard nav
noeypatt Apr 25, 2020
a99a93e
:lipstick:Dashboard nav
noeypatt Apr 25, 2020
be25758
:lipstick:Dashboard nav
noeypatt Apr 25, 2020
5b7d7ff
:lipstick:Dashboard nav
noeypatt Apr 25, 2020
a11f75f
:lipstick:Dashboard nav
noeypatt Apr 25, 2020
957a8a2
:lipstick:Dashboard nav
noeypatt Apr 26, 2020
92835ac
:lipstick:Dashboard nav
noeypatt Apr 26, 2020
a645ece
:lipstick:Dashboard nav
noeypatt Apr 26, 2020
6832c9b
:lipstick:Dashboard nav
noeypatt Apr 26, 2020
f615bb0
:lipstick:Dashboard nav
noeypatt Apr 26, 2020
3ca054d
:lipstick:Dashboard nav
noeypatt Apr 26, 2020
abc95f6
:lipstick:Dashboard
noeypatt Apr 26, 2020
f5f92d8
:lipstick:empty
noeypatt Apr 26, 2020
d5adf51
:lipstick:empty
noeypatt Apr 26, 2020
020ffbf
:bug:
noeypatt Apr 26, 2020
6af3709
:bug:
noeypatt Apr 26, 2020
71499b8
:lipstick:Contact
noeypatt Apr 26, 2020
b6cbbce
:remove:img
noeypatt Apr 26, 2020
eaef29c
:lipstick:Allowance img
noeypatt Apr 27, 2020
562e3c6
:lipstick:Dashboard
noeypatt Apr 27, 2020
832fef2
:sparkles:FontAwesomeIcon
noeypatt Apr 27, 2020
e3c881d
:lipstick:Empty
noeypatt Apr 27, 2020
f801f40
:lipstick:Error
noeypatt Apr 27, 2020
41715dd
:lipstick:Error
noeypatt Apr 27, 2020
0ad8c6e
:lipstick:Dashboard Nav
noeypatt Apr 27, 2020
df388c3
:lipstick:Contact
noeypatt Apr 27, 2020
988c074
:lipstick:Dashboard Nav
noeypatt Apr 27, 2020
dacd1f6
:bug:
noeypatt Apr 28, 2020
32c6335
:bug: empty
noeypatt Apr 28, 2020
1c5b1d6
:bug:empty
noeypatt Apr 28, 2020
76b56b9
:bug:empty
noeypatt Apr 28, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions components/Empty.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react'
import Link from 'next/link';

const Empty = () => {

return (
<div className="warp-empty">
<div className="content-empty">
<img src="/static/empty.jpg" alt="empty" />
<div className="title-empty">
<h4>ความผิดพลาด 401 ข้อมูลไม่พร้อมใช้งาน</h4>
<h4>โปรดกลับสู่หน้าแรก</h4>
</div>
</div>
<Link href="/">
<h5>หน้าแรก</h5>
</Link>
</div>
)
}
export default Empty;
92 changes: 92 additions & 0 deletions components/about.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
import React, { useState } from 'react';
import { useMediaQuery } from 'react-responsive';

const About = () => {

const isSmallScreen = useMediaQuery({ maxDeviceWidth: 575.98 })

const [data, setData] = useState([
{
title: "ระดับเริ่มต้น (Aging society)",
text: "สังคมที่มีประชากรอายุ 60 ปีขึ้นไปมากกว่าร้อยละ 10 ของประชากรทั้งประเทศ",
subtext: "หรือมีประชากรอายุตั้งแต่ 65 ปีมากกว่าร้อยละ 7 ของประชากรทั้งประเทศ"
},
{
title: "ระดับสมบูรณ์ (Aged society)",
text: "สังคมที่มีประชากรอายุ 60 ปีขึ้นไป มากกว่าร้อยละ 20 ของประชากรทั้งประเทศ",
subtext: "หรือมีประชากรอายุตั้งแต่ 65 ปี มากกว่าร้อยละ 14 ของประชากรทั้งประเทศ"
},
{
title: "ระดับสูง (Super-aged society)",
text: "สังคมที่มีประชากรอายุ 65 ปีขึ้นไปมากกว่า ร้อยละ 20 ของประชากรทั้งประเทศ",
subtext: ""
},
])

return (
<div className="warp-about">
<div className="page-content">
{
isSmallScreen ?
<div className="container-fluid">
<div className="head-content">
<h4>สังคมผู้สูงอายุ <br />และระดับของการเข้าสู่สังคมผู้สูงอายุ</h4>
<h5> ถูกแบ่งออกเป็น 3 ระดับ</h5>
</div>

<div className="detail-content">
<img src="/static/gifcover.gif" />
<div className="data-detail-content">
{
data.map((item, index) => (
<div className="title-content" key={index}>
<h6 className="header-title-content">{item.title}</h6>
<h6>{item.text}</h6>
<h6>{item.subtext}</h6>
</div>
))
}
<div className="more-content">
<h6>อ่านต่อ</h6>
<a href="/index/society">
<img className="hvr-wobble-horizontal" src="/static/arrow.svg" alt="arrow-icon" />
</a>
</div>
</div>
</div>
</div>
:
<div className="container-fluid">
<div className="head-content">
<h3>สังคมผู้สูงอายุ และระดับของการเข้าสู่สังคมผู้สูงอายุ</h3>
<h3> ถูกแบ่งออกเป็น 3 ระดับ</h3>
</div>

<div className="detail-content">
<img src="/static/gifcover.gif" />
<div className="data-detail-content">
{
data.map((item, index) => (
<div className="title-content" key={index}>
<h6 className="header-title-content">{item.title}</h6>
<h6>{item.text}</h6>
<h6>{item.subtext}</h6>
</div>
))
}
<div className="more-content">
<h6>อ่านต่อ</h6>
<a href="/index/society">
<img className="hvr-wobble-horizontal" src="/static/arrow.svg" alt="arrow-icon" />
</a>
</div>

</div>
</div>
</div>
}
</div>
</div>
)
}
export default About;
117 changes: 117 additions & 0 deletions components/agency.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
import React, { useState } from 'react';
import { useMediaQuery } from 'react-responsive';
import { Steps } from 'antd';
const { Step } = Steps;

const Agency = () => {

const isTablet = useMediaQuery({ maxDeviceWidth: 1025 })
const isMobile = useMediaQuery({ maxDeviceWidth: 768 })
const isSmallScreen = useMediaQuery({ maxDeviceWidth: 575.98 })

const [card, setCard] = useState([
{
img: "/static/box1.jpg",
box: "1",
content: "ตรวจเช็คคุณสมบัติ",
description: "สัญชาติไทย อายุ 59 ปีบริบูรณ์ เเละไม่เป็นผู้ได้รับสิทธิประโยชน์จากหน่วยงานรัฐ หรือวิสาหกิจ",
},
{
img: "/static/box2.jpg",
box: "2",
content: "เตรียมเอกสาร",
description: "บัตรประชาชน ทะเบียนบ้าน สมุดบัญชีเงินฝาก",
},
{
img: "/static/box3.jpg",
box: "3",
content: "ยื่นคำขอลงทะเบียน",
description: "ที่สำนักงานเขต หรือเทศบาล ที่มีชื่ออยู่ในทะเบียนบ้าน",
},
{
img: "/static/box4.jpg",
box: "4",
content: "รออนุมัติ เพื่อรับเงิน",
description: `รับเป็นเงินสดหรือโอนเข้าบัญชีธนาคารด้วยตนเองหรือโดยผู้เเเทน`
},
])

return (
<div className="warp-agency">
{
isSmallScreen ?
<React.Fragment>
<div className="head-agency">
<h3>วิธีการลงทะเบียนรับเบี้ยยังชีพผู้สูงอายุ</h3>
<div className="title-agency">
<h6>โดยการลงทะเบียนรับเบี้ยยังชีพผู้สูงอายุ</h6>
<h6>ไม่จำเป็นต้องไปลงทะเบียนใหม่ทุกปี ลงเพียงครั้งเดียวก็ได้รับสิทธิไปตลอด</h6>
<h6><sup>*</sup>เว้นแต่กรณีที่ผู้สูงอายุย้ายที่อยู่อาศัย</h6>
</div>
</div>
<div className="content-agency-mobile">
<Steps progressDot current={3} direction="vertical">
{
card.map((items, index) => (
<Step key={index} title={items.content} description={items.description} />
))
}
</Steps>
</div>
</React.Fragment>
:
isMobile || isTablet ?
<React.Fragment>
<div className="head-agency">
<h3>วิธีการลงทะเบียนรับเบี้ยยังชีพผู้สูงอายุ</h3>
<div className="title-agency">
<h6>โดยการลงทะเบียนรับเบี้ยยังชีพผู้สูงอายุ</h6>
<h6>ไม่จำเป็นต้องไปลงทะเบียนใหม่ทุกปี ลงเพียงครั้งเดียวก็ได้รับสิทธิไปตลอด</h6>
<h6><sup>*</sup>เว้นแต่กรณีที่ผู้สูงอายุย้ายที่อยู่อาศัย</h6>
</div>
</div>
<div className="content-agency-mobile">
<Steps progressDot current={3} direction="vertical">
{
card.map((items, index) => (
<Step key={index} title={items.content} description={items.description} />
))
}
</Steps>
<img src="/static/agency.jpg" alt="img-agency" />
</div>
</React.Fragment>
:
<React.Fragment>
<div className="head-agency">
<h3>วิธีการลงทะเบียนรับเบี้ยยังชีพผู้สูงอายุ</h3>
<svg>
<line x1="100" y1="0" x2="200" y2="0" />
</svg>
<div className="title-agency">
<h6>โดยการลงทะเบียนรับเบี้ยยังชีพผู้สูงอายุ</h6>
<h6>ไม่จำเป็นต้องไปลงทะเบียนใหม่ทุกปี ลงเพียงครั้งเดียวก็ได้รับสิทธิไปตลอด</h6>
<h6><sup>*</sup>เว้นแต่กรณีที่ผู้สูงอายุย้ายที่อยู่อาศัย</h6>
</div>
</div>
<div className="content-agency">
{
card.map((items, index) => (
<div className="content-agency-card" key={index}>
<img src={items.img} alt={`box${index}`} />
<div className="agency-box">
<h6>{items.box}</h6>
</div>
<p>{items.content}</p>
</div>
))
}
</div>
</React.Fragment>

}

</div>
)
}
export default Agency;
111 changes: 50 additions & 61 deletions components/chart/barChart.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
import React, { useState, useEffect } from 'react'
import Chart from 'react-apexcharts'
import Sheetapi from '../../config/api'

import { useMediaQuery } from 'react-responsive';

const Barchart = () => {

const isSmallScreen = useMediaQuery({ maxWidth: 768 })

const [options, setOptions] = useState({
title: {
text: 'สถานภาพของผู้สูงอายุ',
align: 'left'
},
responsive: [{
breakpoint: 575.98,
options: {
legend: {
position: "bottom",
offsetY: 5
},
},
}],
chart: {
stacked: true,
toolbar: {
Expand All @@ -19,16 +30,6 @@ const Barchart = () => {
enabled: true
}
},
responsive: [{
breakpoint: 1000,
options: {
legend: {
position: 'bottom',
offsetX: -10,
offsetY: 0
}
}
}],
plotOptions: {
bar: {
horizontal: false,
Expand All @@ -47,11 +48,27 @@ const Barchart = () => {
return val + " คน"
}
}
},
xaxis: {
categories: ["โสด",
"สมรส",
"หม้าย",
"หย่าร้าง",
"เเยกกันอยู่",
"อื่นๆ"]
}
})

const [series, setSeries] = useState([])
const [dataName, setDataName] = useState([])
const [series, setSeries] = useState([
{
name: 'เพศชาย',
data: [50, 50, 50, 50, 50]
},
{
name: 'เพศหญิง',
data: [50, 50, 50, 50, 50]
}
])

useEffect(() => {
fetchData()
Expand All @@ -67,7 +84,6 @@ const Barchart = () => {
const namelist = async (token, value) => {
try {
var list = await Sheetapi.getSheet(token, value)
setDataName(_.flatten(list))

setOptions({
xaxis: {
Expand All @@ -93,52 +109,25 @@ const Barchart = () => {

return (
<React.Fragment>
<div className="warp-chart-small">
<Chart
options={options}
series={series}
type="bar" height="300"
width="250"
/>
</div>

<div className="warp-chart-mobile">
<Chart
options={options}
series={series}
type="bar" height="200"
width="450"
/>
</div>

<div className="warp-chart-tablets">
<Chart
options={options}
series={series}
type="bar" height="220"
width="500"
/>
</div>

<div className="warp-chart-desktops">
<Chart
options={options}
series={series}
type="bar" height="245"
width="550"
/>
</div>

<div className="warp-chart-large">
<Chart
options={options}
series={series}
type="bar" height="285"
width="600"
/>
</div>
</React.Fragment>

{
isSmallScreen ?
<Chart
options={options}
series={series}
type="bar"
height="300"
width="300"
/>
:
<Chart
options={options}
series={series}
type="bar"
height="285"
width="600"
/>
}
</React.Fragment >
)
}
export default Barchart;
export default Barchart;
Loading