chore: install shadcn for tables, adding sttings page

This commit is contained in:
Pablo Lara
2024-07-28 16:40:29 +02:00
parent b8de713497
commit 54b3fc3ae6
8 changed files with 51 additions and 15 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
import "@/styles/globals.css";
import clsx from "clsx";
import { Metadata, Viewport } from "next";
import React from "react";
import { SidebarWrap } from "@/components";
import { fontSans } from "@/config/fonts";
import { siteConfig } from "@/config/site";
import { cn } from "@/lib/utils";
import { Providers } from "../providers";
@@ -38,7 +38,7 @@ export default function RootLayout({
<head />
<body
suppressHydrationWarning
className={clsx(
className={cn(
"min-h-screen bg-background font-sans antialiased",
fontSans.variable,
)}
+12
View File
@@ -0,0 +1,12 @@
import { Spacer } from "@nextui-org/react";
import { Header } from "@/components";
export default async function Settings() {
return (
<>
<Header title="Settings" icon="solar:settings-outline" />
<Spacer />
</>
);
}
-8
View File
@@ -1,8 +0,0 @@
import "server-only";
export default async function getProvider() {
const res = await fetch("http://localhost:3000/api/providers");
const product = await res.json();
return product;
}
-1
View File
@@ -1 +0,0 @@
export * from "./dataProvider";
+4 -1
View File
@@ -1,4 +1,7 @@
import { Fira_Code as FontMono, Inter as FontSans } from "next/font/google";
import {
Fira_Code as FontMono,
Plus_Jakarta_Sans as FontSans,
} from "next/font/google";
export const fontSans = FontSans({
subsets: ["latin"],
+1 -1
View File
@@ -37,7 +37,7 @@
"id": "16aaeb4e-d3cd-4bb6-86f8-6c39cf93821e",
"type": "providers",
"attributes": {
"provider": "aws",
"provider": "azure",
"provider_id": "1234567891",
"alias": "mock_aws_not_connected",
"connection": {
+7 -2
View File
@@ -5,16 +5,21 @@
"@nextui-org/theme": "2.2.5",
"@react-aria/ssr": "3.9.4",
"@react-aria/visually-hidden": "3.8.12",
"clsx": "2.1.1",
"@tanstack/react-table": "^8.19.3",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"date-fns": "^3.6.0",
"framer-motion": "~11.1.1",
"intl-messageformat": "^10.5.0",
"lucide-react": "^0.417.0",
"next": "14.2.3",
"next-themes": "^0.2.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"server-only": "^0.0.1",
"swr": "^2.2.5"
"swr": "^2.2.5",
"tailwind-merge": "^2.4.0",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@iconify/react": "^5.0.1",
+25
View File
@@ -8,3 +8,28 @@ export type IconProps = {
icon: React.FC<IconSvgProps>;
style?: React.CSSProperties;
};
export interface ProviderProps {
id: string;
type: "providers";
attributes: {
provider: "aws" | "azure" | "gcp";
provider_id: string;
alias: string;
connection: {
connected: boolean;
last_checked_at: string;
};
scanner_args: {
only_logs: boolean;
excluded_checks: string[];
aws_retries_max_attempts: number;
};
inserted_at: string;
updated_at: string;
created_by: {
object: string;
id: string;
};
};
}