fix: fix build error
This commit is contained in:
parent
ec14a91d6f
commit
ca8d95f3a3
@ -34,8 +34,8 @@ export default function LoginPage() {
|
||||
}
|
||||
}
|
||||
return result
|
||||
} catch (error: any) {
|
||||
if (error.message.includes("Network Error")) {
|
||||
} catch (error: unknown) {
|
||||
if (error instanceof Error && error.message.includes("Network Error")) {
|
||||
console.error("Problème de connexion au serveur");
|
||||
}
|
||||
console.error("Autre = ", error);
|
||||
|
||||
@ -17,7 +17,6 @@ import { Admin } from "#/types";
|
||||
|
||||
export default function Admins() {
|
||||
const { data: session, status } = useSession();
|
||||
const [open, setOpen] = useState(false);
|
||||
const [openModal, setOpenModal] = useState(false);
|
||||
const [openDeleteModal, setOpenDeleteModal] = useState(false);
|
||||
const [openEditModal, setOpenEditModal] = useState(false);
|
||||
|
||||
@ -42,7 +42,7 @@ export default function HomePage () {
|
||||
}
|
||||
})
|
||||
|
||||
const { mutate, isPending } = useMutation({
|
||||
const { mutate } = useMutation({
|
||||
mutationFn: async (id: string) => {
|
||||
try {
|
||||
const response = await axios.delete(
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Inter } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import NextTopLoader from "nextjs-toploader";
|
||||
import "../assets/css/ruben-ui.css"
|
||||
import { AuthProvider } from "#/components/provider/authProvider";
|
||||
import { QueryClientProvide } from "#/components/provider/queryClient";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Private Docs",
|
||||
description: "L'appli de gestion de documents par excellence !",
|
||||
|
||||
@ -7,8 +7,6 @@ import { DropdownMenu } from "radix-ui";
|
||||
import Link from "next/link";
|
||||
import Theme from "./theme";
|
||||
|
||||
import ProfilePicture from "../../assets/icons/profile.svg"
|
||||
|
||||
export default function AdminHeader() {
|
||||
const [open, setOpen] = React.useState(false);
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import * as Dialog from "@radix-ui/react-dialog";
|
||||
import { ReactNode, useState } from "react";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
export function Modal({
|
||||
trigger,
|
||||
|
||||
@ -25,7 +25,7 @@ export default function Statistics() {
|
||||
if(response.data) {
|
||||
return response.data as Stats
|
||||
}
|
||||
} catch (error: any) {
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,9 +10,9 @@ import {
|
||||
Table as TableType,
|
||||
} from "@tanstack/react-table"
|
||||
import { ReactNode, useEffect, useRef, useState } from "react";
|
||||
import { clsx, type ClassValue } from "clsx"
|
||||
import Image from "next/image";
|
||||
import { icons } from "#/assets/icons";
|
||||
import clsx from "clsx";
|
||||
|
||||
interface DataTableProps<TData, TValue> {
|
||||
columns: ColumnDef<TData, TValue>[]
|
||||
@ -63,12 +63,16 @@ export default function Table<TData, TValue>({
|
||||
table.getIsSomePageRowsSelected() && !table.getIsAllPageRowsSelected();
|
||||
}
|
||||
|
||||
console.log("SELECTED ALL = ", table.getSelectedRowModel().rows)
|
||||
console.log("SELECTED = ", table.getRowModel().rows.filter((row) => row.getIsSelected()).map(row => row.original))
|
||||
const selectedRows = table.getSelectedRowModel().rows;
|
||||
const filteredSelectedRows = table
|
||||
.getRowModel()
|
||||
.rows.filter((row) => row.getIsSelected())
|
||||
.map((row) => row.original);
|
||||
|
||||
console.log("SELECTED ALL = ", selectedRows);
|
||||
console.log("SELECTED = ", filteredSelectedRows);
|
||||
}, [
|
||||
table.getIsSomePageRowsSelected(),
|
||||
table.getIsAllPageRowsSelected(),
|
||||
table.getRowModel()
|
||||
table
|
||||
]);
|
||||
|
||||
const totalPages = table.getPageCount()
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { FormEventHandler, ReactNode } from "react";
|
||||
import { ReactNode } from "react";
|
||||
import { ZodSchema } from "zod";
|
||||
export interface Option {
|
||||
label: string
|
||||
@ -17,7 +17,7 @@ export interface FloatingLabelInputProps {
|
||||
onChange?: (value: string) => void;
|
||||
}
|
||||
|
||||
export interface FormProps {
|
||||
export interface FormProps{
|
||||
title?: string,
|
||||
fields: FloatingLabelInputProps[],
|
||||
submit: (param: any) => unknown,
|
||||
@ -45,10 +45,11 @@ export interface Stats {
|
||||
export interface Company {
|
||||
id: string
|
||||
name: string
|
||||
description?: string;
|
||||
is_premium: boolean
|
||||
status: string
|
||||
owner: Owner
|
||||
total_users: number
|
||||
total_users?: number
|
||||
}
|
||||
|
||||
export interface Owner {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user