Skip to content

Commit

Permalink
Merge pull request #151 from justpiple/main
Browse files Browse the repository at this point in the history
Fix and refactor
  • Loading branch information
justpiple authored Apr 15, 2024
2 parents 12e0aa4 + 92d7e49 commit e5b9002
Show file tree
Hide file tree
Showing 8 changed files with 409 additions and 393 deletions.
43 changes: 43 additions & 0 deletions src/app/(admin)/admin/components/Icons.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
export const DashboardIcon = () => {
return (
<svg
width="24"
height="25"
viewBox="0 0 24 25"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10.1103 11.65H7.4603C6.8303 11.65 6.32031 12.16 6.32031 12.79V17.91H10.1103V11.65V11.65Z"
stroke="#E04E4E"
stroke-width="1.5"
stroke-miterlimit="10"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M12.7616 7.09998H11.2415C10.6115 7.09998 10.1016 7.60999 10.1016 8.23999V17.9H13.8916V8.23999C13.8916 7.60999 13.3916 7.09998 12.7616 7.09998Z"
stroke="#E04E4E"
stroke-width="1.5"
stroke-miterlimit="10"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M16.5484 13.35H13.8984V17.9H17.6884V14.49C17.6784 13.86 17.1684 13.35 16.5484 13.35Z"
stroke="#E04E4E"
stroke-width="1.5"
stroke-miterlimit="10"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M9 22.5H15C20 22.5 22 20.5 22 15.5V9.5C22 4.5 20 2.5 15 2.5H9C4 2.5 2 4.5 2 9.5V15.5C2 20.5 4 22.5 9 22.5Z"
stroke="#E04E4E"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
);
};
42 changes: 2 additions & 40 deletions src/app/(admin)/admin/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import Link from "next/link";
import Image from "next/image";
import { Session } from "next-auth";
import { P } from "@/app/_components/global/Text";
import { MdDashboard, MdOutlineDashboard } from "react-icons/md";
import { protectedRoutes } from "@/utils/protectedRoutes";
import { usePathname } from "next/navigation";
import { DashboardIcon } from "./Icons";

type navbarParam = {
nav: boolean;
Expand Down Expand Up @@ -47,45 +47,7 @@ export function Sidebar({ nav, session }: navbarParam) {
href={"/admin"}
className="group flex items-center rounded-lg p-2 text-base font-normal text-primary-400 hover:bg-red-100 transition-all"
>
<svg
width="24"
height="25"
viewBox="0 0 24 25"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10.1103 11.65H7.4603C6.8303 11.65 6.32031 12.16 6.32031 12.79V17.91H10.1103V11.65V11.65Z"
stroke="#E04E4E"
stroke-width="1.5"
stroke-miterlimit="10"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M12.7616 7.09998H11.2415C10.6115 7.09998 10.1016 7.60999 10.1016 8.23999V17.9H13.8916V8.23999C13.8916 7.60999 13.3916 7.09998 12.7616 7.09998Z"
stroke="#E04E4E"
stroke-width="1.5"
stroke-miterlimit="10"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M16.5484 13.35H13.8984V17.9H17.6884V14.49C17.6784 13.86 17.1684 13.35 16.5484 13.35Z"
stroke="#E04E4E"
stroke-width="1.5"
stroke-miterlimit="10"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M9 22.5H15C20 22.5 22 20.5 22 15.5V9.5C22 4.5 20 2.5 15 2.5H9C4 2.5 2 4.5 2 9.5V15.5C2 20.5 4 22.5 9 22.5Z"
stroke="#E04E4E"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
<DashboardIcon />
<P className="ml-3 whitespace-nowrap text-primary-400 font-semibold">
Dashboard
</P>
Expand Down
Loading

0 comments on commit e5b9002

Please sign in to comment.