From 6138c7da9d70329cdafa6d24f5ca795c54ac54fb Mon Sep 17 00:00:00 2001 From: Pablo Lara Date: Tue, 9 Jul 2024 13:04:04 +0200 Subject: [PATCH] chore: update prettier config and fix linting issues --- app/about/layout.tsx | 10 +- app/blog/layout.tsx | 10 +- app/clouds/layout.tsx | 6 +- app/clouds/page.tsx | 22 ++++- app/docs/layout.tsx | 10 +- app/error.tsx | 8 +- app/layout.tsx | 19 +++- app/login/layout.tsx | 10 +- app/login/page.tsx | 23 ++++- app/page.tsx | 28 ++++-- app/pricing/layout.tsx | 10 +- .../{theme-switch.tsx => ThemeSwitch.tsx} | 29 +++++- components/icons.tsx | 95 ++++++++++++++++--- components/navbar.tsx | 4 +- components/primitives.ts | 10 +- 15 files changed, 244 insertions(+), 50 deletions(-) rename components/{theme-switch.tsx => ThemeSwitch.tsx} (70%) diff --git a/app/about/layout.tsx b/app/about/layout.tsx index cfdc03b801..98956a52ad 100644 --- a/app/about/layout.tsx +++ b/app/about/layout.tsx @@ -1,7 +1,13 @@ -export default function AboutLayout({ children }: { children: React.ReactNode }) { +export default function AboutLayout({ + children, +}: { + children: React.ReactNode; +}) { return (
-
{children}
+
+ {children} +
); } diff --git a/app/blog/layout.tsx b/app/blog/layout.tsx index 365caee773..911d0bcf41 100644 --- a/app/blog/layout.tsx +++ b/app/blog/layout.tsx @@ -1,7 +1,13 @@ -export default function BlogLayout({ children }: { children: React.ReactNode }) { +export default function BlogLayout({ + children, +}: { + children: React.ReactNode; +}) { return (
-
{children}
+
+ {children} +
); } diff --git a/app/clouds/layout.tsx b/app/clouds/layout.tsx index 8c8daab55d..d9ca1e80e4 100644 --- a/app/clouds/layout.tsx +++ b/app/clouds/layout.tsx @@ -1,4 +1,8 @@ -export default function CloudsLayout({ children }: { children: React.ReactNode }) { +export default function CloudsLayout({ + children, +}: { + children: React.ReactNode; +}) { return (
{children}
diff --git a/app/clouds/page.tsx b/app/clouds/page.tsx index 48d18551f8..d546612378 100644 --- a/app/clouds/page.tsx +++ b/app/clouds/page.tsx @@ -22,13 +22,21 @@ import { title } from "@/components/primitives"; import { fetcher } from "@/utils/fetcher"; export default function CloudsPage() { - const getAccounts = useSWR("http://localhost:8080/api/v1/providers/aws/accounts", fetcher); + const getAccounts = useSWR( + "http://localhost:8080/api/v1/providers/aws/accounts", + fetcher, + ); - const getAudits = useSWR("http://localhost:8080/api/v1/providers/aws/audits", fetcher); + const getAudits = useSWR( + "http://localhost:8080/api/v1/providers/aws/audits", + fetcher, + ); // TODO FIX TYPE CHECKING const getScanDetails = (account_id: number, detail: string) => { - const scan = getAudits.data && getAudits.data.find((audit: any) => audit.account_id === account_id); + const scan = + getAudits.data && + getAudits.data.find((audit: any) => audit.account_id === account_id); if (detail === "status") { return scan?.audit_complete && "Completed"; @@ -70,8 +78,12 @@ export default function CloudsPage() {

Cloud Accounts

- {getAccounts.error && Failed to load} - {getAccounts.isLoading && Loading} + {getAccounts.error && ( + Failed to load + )} + {getAccounts.isLoading && ( + Loading + )}

{getAccounts.data && ( diff --git a/app/docs/layout.tsx b/app/docs/layout.tsx index e3d89f490a..eaf63f3b99 100644 --- a/app/docs/layout.tsx +++ b/app/docs/layout.tsx @@ -1,7 +1,13 @@ -export default function DocsLayout({ children }: { children: React.ReactNode }) { +export default function DocsLayout({ + children, +}: { + children: React.ReactNode; +}) { return (
-
{children}
+
+ {children} +
); } diff --git a/app/error.tsx b/app/error.tsx index 388b7fcc7b..9ed5104e8a 100644 --- a/app/error.tsx +++ b/app/error.tsx @@ -2,7 +2,13 @@ import { useEffect } from "react"; -export default function Error({ error, reset }: { error: Error; reset: () => void }) { +export default function Error({ + error, + reset, +}: { + error: Error; + reset: () => void; +}) { useEffect(() => { // Log the error to an error reporting service /* eslint-disable no-console */ diff --git a/app/layout.tsx b/app/layout.tsx index 39517f2bf1..275ebe292b 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,9 +1,9 @@ import "@/styles/globals.css"; +import { Navbar } from "@nextui-org/react"; import clsx from "clsx"; import { Metadata, Viewport } from "next"; -import { Navbar } from "@/components/navbar"; import { fontSans } from "@/config/fonts"; import { siteConfig } from "@/config/site"; @@ -27,15 +27,26 @@ export const viewport: Viewport = { ], }; -export default function RootLayout({ children }: { children: React.ReactNode }) { +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { return ( - +
-
{children}
+
+ {children} +
diff --git a/app/login/layout.tsx b/app/login/layout.tsx index 561d6bcc49..d3a4a58ea4 100644 --- a/app/login/layout.tsx +++ b/app/login/layout.tsx @@ -1,7 +1,13 @@ -export default function LoginLayout({ children }: { children: React.ReactNode }) { +export default function LoginLayout({ + children, +}: { + children: React.ReactNode; +}) { return (
-
{children}
+
+ {children} +
); } diff --git a/app/login/page.tsx b/app/login/page.tsx index c348917daf..f07535d803 100644 --- a/app/login/page.tsx +++ b/app/login/page.tsx @@ -2,7 +2,15 @@ import { EyeIcon } from "@heroicons/react/24/solid"; import { EyeSlashIcon } from "@heroicons/react/24/solid"; -import { Button, Card, CardBody, CardFooter, CardHeader, Input, Link } from "@nextui-org/react"; +import { + Button, + Card, + CardBody, + CardFooter, + CardHeader, + Input, + Link, +} from "@nextui-org/react"; import React from "react"; export default function LoginPage() { @@ -18,13 +26,22 @@ export default function LoginPage() {

Login

- + +