From a4b3adaace30cb2fa6e3ed8ab2900e16ff0933e2 Mon Sep 17 00:00:00 2001 From: Grant Date: Sat, 2 Mar 2024 19:18:25 -0700 Subject: [PATCH] fix linting & building errors --- .../admin/src/components/CardTransactions.tsx | 1 - .../navbar/notifications-dropdown.tsx | 1 - .../src/components/navbar/user-dropdown.tsx | 2 -- .../admin/src/components/sidebar/Sidebar.tsx | 2 +- .../src/components/sidebar/collapse-items.tsx | 7 ++----- .../admin/src/components/table/TableWrapper.tsx | 1 - packages/admin/{ => src}/index.html | 7 ++++--- .../admin/src/pages/Accounts/Accounts/page.tsx | 1 - packages/admin/vite.config.ts | 17 +++++++++++++---- packages/client/vite.config.js | 2 +- 10 files changed, 21 insertions(+), 20 deletions(-) rename packages/admin/{ => src}/index.html (57%) diff --git a/packages/admin/src/components/CardTransactions.tsx b/packages/admin/src/components/CardTransactions.tsx index 197a5f0..916653a 100644 --- a/packages/admin/src/components/CardTransactions.tsx +++ b/packages/admin/src/components/CardTransactions.tsx @@ -1,5 +1,4 @@ import { Avatar, Card, CardBody } from "@nextui-org/react"; -import React from "react"; const items = [ { diff --git a/packages/admin/src/components/navbar/notifications-dropdown.tsx b/packages/admin/src/components/navbar/notifications-dropdown.tsx index 6b27b94..afb1f6c 100644 --- a/packages/admin/src/components/navbar/notifications-dropdown.tsx +++ b/packages/admin/src/components/navbar/notifications-dropdown.tsx @@ -6,7 +6,6 @@ import { DropdownTrigger, NavbarItem, } from "@nextui-org/react"; -import React from "react"; // import { NotificationIcon } from "../icons/navbar/notificationicon"; export const NotificationsDropdown = () => { diff --git a/packages/admin/src/components/navbar/user-dropdown.tsx b/packages/admin/src/components/navbar/user-dropdown.tsx index 5e6ca15..0345c8d 100644 --- a/packages/admin/src/components/navbar/user-dropdown.tsx +++ b/packages/admin/src/components/navbar/user-dropdown.tsx @@ -4,10 +4,8 @@ import { DropdownItem, DropdownMenu, DropdownTrigger, - Navbar, NavbarItem, } from "@nextui-org/react"; -import React from "react"; // import { DarkModeSwitch } from "./darkmodeswitch"; export const UserDropdown = () => { diff --git a/packages/admin/src/components/sidebar/Sidebar.tsx b/packages/admin/src/components/sidebar/Sidebar.tsx index 45c9485..b509fe8 100644 --- a/packages/admin/src/components/sidebar/Sidebar.tsx +++ b/packages/admin/src/components/sidebar/Sidebar.tsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import { useState } from "react"; import { Sidebar } from "./sidebar.styles"; import { SidebarItem } from "./sidebar-item"; import { SidebarMenu } from "./sidebar-menu"; diff --git a/packages/admin/src/components/sidebar/collapse-items.tsx b/packages/admin/src/components/sidebar/collapse-items.tsx index 2274101..ec1a205 100644 --- a/packages/admin/src/components/sidebar/collapse-items.tsx +++ b/packages/admin/src/components/sidebar/collapse-items.tsx @@ -1,10 +1,9 @@ "use client"; -import React, { useState } from "react"; +import React from "react"; // import { ChevronUpIcon } from "../icons/sidebar/chevron-up-icon"; import { Accordion, AccordionItem } from "@nextui-org/react"; -import clsx from "clsx"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faChevronDown, faChevronUp } from "@fortawesome/free-solid-svg-icons"; +import { faChevronDown } from "@fortawesome/free-solid-svg-icons"; interface Props { icon: React.ReactNode; @@ -13,8 +12,6 @@ interface Props { } export const CollapseItems = ({ icon, items, title }: Props) => { - const [open, setOpen] = useState(false); - return (
diff --git a/packages/admin/src/components/table/TableWrapper.tsx b/packages/admin/src/components/table/TableWrapper.tsx index 04a4a91..b7a66ec 100644 --- a/packages/admin/src/components/table/TableWrapper.tsx +++ b/packages/admin/src/components/table/TableWrapper.tsx @@ -6,7 +6,6 @@ import { TableHeader, TableRow, } from "@nextui-org/react"; -import React from "react"; import { RenderCell } from "./render-cell"; import { columns, users } from "./data"; diff --git a/packages/admin/index.html b/packages/admin/src/index.html similarity index 57% rename from packages/admin/index.html rename to packages/admin/src/index.html index e4b78ea..cb35aab 100644 --- a/packages/admin/index.html +++ b/packages/admin/src/index.html @@ -2,12 +2,13 @@ - - Vite + React + TS + canvas admin + +
- + diff --git a/packages/admin/src/pages/Accounts/Accounts/page.tsx b/packages/admin/src/pages/Accounts/Accounts/page.tsx index 8752041..9e2b807 100644 --- a/packages/admin/src/pages/Accounts/Accounts/page.tsx +++ b/packages/admin/src/pages/Accounts/Accounts/page.tsx @@ -1,7 +1,6 @@ import { faFile } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { BreadcrumbItem, Breadcrumbs, Button, Input } from "@nextui-org/react"; -import { TableWrapper } from "../../../components/table/TableWrapper"; import { AccountsTable } from "./AccountsTable"; export const AccountsPage = () => { diff --git a/packages/admin/vite.config.ts b/packages/admin/vite.config.ts index 5a33944..67a8eea 100644 --- a/packages/admin/vite.config.ts +++ b/packages/admin/vite.config.ts @@ -1,7 +1,16 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react()], -}) + root: "src", + envDir: "..", + build: { + outDir: "../dist", + }, + plugins: [ + react({ + include: "**/*.{jsx,tsx}", + }), + ], +}); diff --git a/packages/client/vite.config.js b/packages/client/vite.config.js index 57b6222..e37b7d9 100644 --- a/packages/client/vite.config.js +++ b/packages/client/vite.config.js @@ -5,7 +5,7 @@ export default defineConfig({ root: "src", envDir: "..", build: { - outDir: "dist", + outDir: "../dist", }, plugins: [ react({