Skip to content

Commit 30dde7a

Browse files
committed
fix: mobile responsiveness
1 parent c1b5086 commit 30dde7a

File tree

8 files changed

+202
-112
lines changed

8 files changed

+202
-112
lines changed

app/layout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const metadata = {
1818
},
1919
},
2020
openGraph: {
21-
images: "/assets/svg/Logo.svg",
21+
images: "/public/Logo.png",
2222
},
2323
};
2424

assets/png/Logo.png

1.06 KB
Loading

assets/svg/DashboardIcon.jsx

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,32 @@ const DashboardIcon = () => {
88
height="24"
99
viewBox="0 0 24 24"
1010
fill="none"
11-
className="hover:scale-110 animation duration-200"
1211
>
1312
<path
14-
className="fill-[#0D062D] dark:fill-slate-200"
1513
d="M7.24 2H5.34C3.15 2 2 3.15 2 5.33V7.23C2 9.41 3.15 10.56 5.33 10.56H7.23C9.41 10.56 10.56 9.41 10.56 7.23V5.33C10.57 3.15 9.42 2 7.24 2Z"
16-
></path>
14+
fill="#0D062D"
15+
/>
1716
<path
1817
opacity="0.4"
1918
d="M18.6699 2H16.7699C14.5899 2 13.4399 3.15 13.4399 5.33V7.23C13.4399 9.41 14.5899 10.56 16.7699 10.56H18.6699C20.8499 10.56 21.9999 9.41 21.9999 7.23V5.33C21.9999 3.15 20.8499 2 18.6699 2Z"
20-
className="fill-[#0D062D] dark:fill-slate-500"
21-
></path>
19+
fill="#0D062D"
20+
/>
2221
<path
2322
d="M18.6699 13.4301H16.7699C14.5899 13.4301 13.4399 14.5801 13.4399 16.7601V18.6601C13.4399 20.8401 14.5899 21.9901 16.7699 21.9901H18.6699C20.8499 21.9901 21.9999 20.8401 21.9999 18.6601V16.7601C21.9999 14.5801 20.8499 13.4301 18.6699 13.4301Z"
24-
className="fill-[#0D062D] dark:fill-slate-200"
25-
></path>
23+
fill="#0D062D"
24+
/>
2625
<path
2726
opacity="0.4"
2827
d="M7.24 13.4301H5.34C3.15 13.4301 2 14.5801 2 16.7601V18.6601C2 20.8501 3.15 22.0001 5.33 22.0001H7.23C9.41 22.0001 10.56 20.8501 10.56 18.6701V16.7701C10.57 14.5801 9.42 13.4301 7.24 13.4301Z"
29-
className="fill-[#0D062D] dark:fill-slate-500"
30-
></path>
28+
fill="#0D062D"
29+
/>
3130
</svg>
3231
);
3332
};
3433

3534
export default DashboardIcon;
3635

36+
// default
3737
{
3838
/* <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
3939
<path d="M7.24 2H5.34C3.15 2 2 3.15 2 5.33V7.23C2 9.41 3.15 10.56 5.33 10.56H7.23C9.41 10.56 10.56 9.41 10.56 7.23V5.33C10.57 3.15 9.42 2 7.24 2Z" fill="#0D062D"/>
@@ -42,3 +42,34 @@ export default DashboardIcon;
4242
<path opacity="0.4" d="M7.24 13.4301H5.34C3.15 13.4301 2 14.5801 2 16.7601V18.6601C2 20.8501 3.15 22.0001 5.33 22.0001H7.23C9.41 22.0001 10.56 20.8501 10.56 18.6701V16.7701C10.57 14.5801 9.42 13.4301 7.24 13.4301Z" fill="#0D062D"/>
4343
</svg> */
4444
}
45+
46+
// styled (not displaying)
47+
{
48+
/* <svg
49+
xmlns="http://www.w3.org/2000/svg"
50+
width="24"
51+
height="24"
52+
viewBox="0 0 24 24"
53+
fill="none"
54+
className="hover:scale-110 animation duration-200"
55+
>
56+
<path
57+
className="fill-[#0D062D] dark:fill-slate-200"
58+
d="M7.24 2H5.34C3.15 2 2 3.15 2 5.33V7.23C2 9.41 3.15 10.56 5.33 10.56H7.23C9.41 10.56 10.56 9.41 10.56 7.23V5.33C10.57 3.15 9.42 2 7.24 2Z"
59+
></path>
60+
<path
61+
opacity="0.4"
62+
d="M18.6699 2H16.7699C14.5899 2 13.4399 3.15 13.4399 5.33V7.23C13.4399 9.41 14.5899 10.56 16.7699 10.56H18.6699C20.8499 10.56 21.9999 9.41 21.9999 7.23V5.33C21.9999 3.15 20.8499 2 18.6699 2Z"
63+
className="fill-[#0D062D] dark:fill-slate-500"
64+
></path>
65+
<path
66+
d="M18.6699 13.4301H16.7699C14.5899 13.4301 13.4399 14.5801 13.4399 16.7601V18.6601C13.4399 20.8401 14.5899 21.9901 16.7699 21.9901H18.6699C20.8499 21.9901 21.9999 20.8401 21.9999 18.6601V16.7601C21.9999 14.5801 20.8499 13.4301 18.6699 13.4301Z"
67+
className="fill-[#0D062D] dark:fill-slate-200"
68+
></path>
69+
<path
70+
opacity="0.4"
71+
d="M7.24 13.4301H5.34C3.15 13.4301 2 14.5801 2 16.7601V18.6601C2 20.8501 3.15 22.0001 5.33 22.0001H7.23C9.41 22.0001 10.56 20.8501 10.56 18.6701V16.7701C10.57 14.5801 9.42 13.4301 7.24 13.4301Z"
72+
className="fill-[#0D062D] dark:fill-slate-500"
73+
></path>
74+
</svg> */
75+
}

assets/svg/DownloadIcon.jsx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import React from "react";
2+
3+
const DownloadIcon = () => {
4+
return (
5+
<svg
6+
xmlns="http://www.w3.org/2000/svg"
7+
width="16"
8+
height="16"
9+
viewBox="0 0 16 16"
10+
fill="none"
11+
>
12+
<path
13+
d="M6 11.8334C5.93333 11.8334 5.87333 11.82 5.80667 11.7934C5.62 11.72 5.5 11.5334 5.5 11.3334V7.33337C5.5 7.06004 5.72667 6.83337 6 6.83337C6.27333 6.83337 6.5 7.06004 6.5 7.33337V10.1267L6.98 9.64671C7.17333 9.45337 7.49333 9.45337 7.68667 9.64671C7.88 9.84004 7.88 10.16 7.68667 10.3534L6.35333 11.6867C6.26 11.78 6.12667 11.8334 6 11.8334Z"
14+
fill="#292D32"
15+
/>
16+
<path
17+
d="M5.99964 11.8334C5.87297 11.8334 5.7463 11.7867 5.6463 11.6867L4.31297 10.3534C4.11964 10.16 4.11964 9.84004 4.31297 9.64671C4.5063 9.45338 4.8263 9.45338 5.01964 9.64671L6.35297 10.98C6.5463 11.1734 6.5463 11.4934 6.35297 11.6867C6.25297 11.7867 6.1263 11.8334 5.99964 11.8334Z"
18+
fill="#292D32"
19+
/>
20+
<path
21+
d="M9.99967 15.1667H5.99967C2.37967 15.1667 0.833008 13.62 0.833008 10V6.00004C0.833008 2.38004 2.37967 0.833374 5.99967 0.833374H9.33301C9.60634 0.833374 9.83301 1.06004 9.83301 1.33337C9.83301 1.60671 9.60634 1.83337 9.33301 1.83337H5.99967C2.92634 1.83337 1.83301 2.92671 1.83301 6.00004V10C1.83301 13.0734 2.92634 14.1667 5.99967 14.1667H9.99967C13.073 14.1667 14.1663 13.0734 14.1663 10V6.66671C14.1663 6.39337 14.393 6.16671 14.6663 6.16671C14.9397 6.16671 15.1663 6.39337 15.1663 6.66671V10C15.1663 13.62 13.6197 15.1667 9.99967 15.1667Z"
22+
fill="#292D32"
23+
/>
24+
<path
25+
d="M14.6663 7.1667H11.9997C9.71967 7.1667 8.83301 6.28003 8.83301 4.00003V1.33337C8.83301 1.13337 8.95301 0.9467 9.13967 0.873366C9.32634 0.793366 9.53967 0.840033 9.68634 0.980033L15.0197 6.31337C15.1597 6.45337 15.2063 6.67337 15.1263 6.86003C15.0463 7.0467 14.8663 7.1667 14.6663 7.1667ZM9.83301 2.54003V4.00003C9.83301 5.72003 10.2797 6.1667 11.9997 6.1667H13.4597L9.83301 2.54003Z"
26+
fill="#292D32"
27+
/>
28+
</svg>
29+
);
30+
};
31+
32+
export default DownloadIcon;

components/dashboard/Dashboard.jsx

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import Link from "next/link";
3-
import { Flex, ProgressBar, Text } from "@tremor/react";
3+
import { ProgressBar } from "@tremor/react";
44

55
import { CardTitle, CardHeader, CardContent, Card } from "@/components/ui/card";
66
import OrderIcon from "@/assets/svg/OrderIcon";
@@ -14,34 +14,52 @@ import SalesGraph from "@/assets/svg/SalesGraph";
1414
import IncomeIcon from "@/assets/svg/IncomeIcon";
1515
import IncomeGraph from "@/assets/svg/IncomeGraph";
1616
import CustomBarChart from "../others/CustomBarChart";
17-
import { BarChartGraph } from "../others/BarChartGraph";
1817
import OrdersTable from "../others/OrdersTable";
1918

2019
const Dashboard = () => {
2120
return (
22-
<main className="flex flex-1 flex-col gap-4 p-4 md:gap-8 md:p-6 z-10">
21+
<main className="fle flex-1 flex-co gap-4 p-4 md:gap-8 md:p-6 z-10">
2322
<div className="space-y-6">
2423
{/* charts */}
25-
<div className="lg:flex gap-6">
24+
<div className="lg:flex gap-6 space-y-6 lg:space-y-0">
2625
<Card className="flex flex-1 flex-col ">
2726
{/* max-w-[50rem] */}
2827
<CardHeader>
29-
<CardTitle>Sales Trends</CardTitle>
28+
<CardTitle className="text-lg font-semibold text-[#26282C] dark:text-gray-50 flex justify-between">
29+
Sales Trends
30+
<span className="space-x-2 text-sm font-medium">
31+
<label for="period">Sort by:</label>
32+
<select
33+
name="period"
34+
id="period"
35+
className="bg-transparent border border-[#E1DFDF] dark:border-gray-100 rounded-3xl px-3 py-1 text-sm font-medium"
36+
>
37+
<option value="weekly" className="dark:bg-gray-800">
38+
Weekly
39+
</option>
40+
<option value="monthly" className="dark:bg-gray-800">
41+
Monthly
42+
</option>
43+
<option value="yearly" className="dark:bg-gray-800">
44+
Yearly
45+
</option>
46+
</select>
47+
</span>
48+
</CardTitle>
3049
</CardHeader>
3150
<CardContent>
32-
{/* <BarChartGraph className="aspect-[4/3]" /> */}
3351
<CustomBarChart />
3452
</CardContent>
3553
</Card>
3654

37-
<div className="flex-none grid md:grid-cols-2 gap-6">
55+
<div className="flex-none lg:mt-0 grid grid-cols-2 gap-6">
3856
{/* order */}
3957
<div className="space-y-2 max-w-[16rem] bg-white dark:bg-black/50 border border-[#EDF2F7] dark:border-[#EDF2F7]/50 p-4 rounded-[0.875rem]">
4058
<span className="flex gap-4 justify-between">
4159
<OrderIcon className="w-5 h-5" />
4260
<OrderGraph />
4361
</span>
44-
<p className="text-[#898989] dark:text-gray-20 font-medium text-lg">
62+
<p className="text-[#898989] dark:text-gray-200 font-medium text-lg">
4563
Total Order
4664
</p>
4765
<p className="text-[#3A3F51] dark:text-gray-50 font-semibold text-2xl">
@@ -61,7 +79,7 @@ const Dashboard = () => {
6179
<RefundIcon className="w-5 h-5" />
6280
<RefundGraph />
6381
</span>
64-
<p className="text-[#898989] dark:text-gray-20 font-medium text-lg">
82+
<p className="text-[#898989] dark:text-gray-200 font-medium text-lg">
6583
Total Refund
6684
</p>
6785
<p className="text-[#3A3F51] dark:text-gray-50 font-semibold text-2xl">
@@ -81,7 +99,7 @@ const Dashboard = () => {
8199
<SalesIcon className="w-5 h-5" />
82100
<SalesGraph />
83101
</span>
84-
<p className="text-[#898989] dark:text-gray-20 font-medium text-lg">
102+
<p className="text-[#898989] dark:text-gray-200 font-medium text-lg">
85103
Average Sales
86104
</p>
87105
<p className="text-[#3A3F51] dark:text-gray-50 font-semibold text-2xl">
@@ -101,7 +119,7 @@ const Dashboard = () => {
101119
<IncomeIcon className="w-5 h-5" />
102120
<IncomeGraph />
103121
</span>
104-
<p className="text-[#898989] dark:text-gray-20 font-medium text-lg">
122+
<p className="text-[#898989] dark:text-gray-200 font-medium text-lg">
105123
Total Income
106124
</p>
107125
<p className="text-[#3A3F51] dark:text-gray-50 font-semibold text-2xl">
@@ -117,7 +135,7 @@ const Dashboard = () => {
117135
</div>
118136
</div>
119137

120-
<div className="lg:flex gap-6">
138+
<div className="lg:flex gap-6 space-y-6 lg:space-y-0">
121139
<Card className="flex flex-1 flex-col">
122140
{/* w-[50rem] */}
123141
<CardHeader>
@@ -211,7 +229,7 @@ const Dashboard = () => {
211229
</div>
212230

213231
{/* footer */}
214-
<div className="">
232+
<div className="pt-4">
215233
<p className="text-center text-[#26282C] dark:text-gray-50">
216234
Geegpay ©{new Date().getFullYear()} Created by{" "}
217235
<Link

0 commit comments

Comments
 (0)