mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Preparing the repository
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
import {PageParams} from "@/types/next";
|
||||
import {prisma} from "@/prisma";
|
||||
import {AgentCard} from "@/components/wrappers/dashboard/agent/AgentCard/AgentCard";
|
||||
import {CardsWithPagination} from "@/components/wrappers/common/cards-with-pagination";
|
||||
import {Button} from "@/components/ui/button";
|
||||
import Link from 'next/link'
|
||||
import {Page, PageActions, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
|
||||
import {currentUser} from "@/auth/current-user";
|
||||
import {db} from "@/db";
|
||||
import {prisma} from "@/prisma";
|
||||
|
||||
|
||||
export default async function RoutePage(props: PageParams<{}>) {
|
||||
|
||||
const agents = await db.agent.findMany()
|
||||
const agents = await prisma.agent.findMany()
|
||||
|
||||
return (
|
||||
<Page>
|
||||
@@ -37,7 +35,7 @@ export default async function RoutePage(props: PageParams<{}>) {
|
||||
/>
|
||||
:
|
||||
<Link
|
||||
href="/dashboard/agents/new"
|
||||
href={"/dashboard/agents/new"}
|
||||
className=" flex item-center justify-center border-2 border-dashed transition-colors border-primary p-8 lg:p-12 w-full rounded-md">
|
||||
Create new Agent
|
||||
</Link>
|
||||
|
||||
+49
-2
@@ -1,6 +1,45 @@
|
||||
// "use client"
|
||||
//
|
||||
// import {useSearchParams} from "next/navigation"
|
||||
//
|
||||
// enum Error {
|
||||
// Configuration = "Configuration",
|
||||
// }
|
||||
//
|
||||
// const errorMap = {
|
||||
// [Error.Configuration]: (
|
||||
// <p>
|
||||
// There was a problem when trying to authenticate. Please contact us if this
|
||||
// error persists. Unique error code:{" "}
|
||||
// <code className="rounded-sm bg-slate-100 p-1 text-xs">Configuration</code>
|
||||
// </p>
|
||||
// ),
|
||||
// }
|
||||
//
|
||||
// export default function AuthErrorPage() {
|
||||
// const search = useSearchParams()
|
||||
// const error = search.get("error") as Error
|
||||
//
|
||||
// return (
|
||||
// <div className="flex h-screen w-full flex-col items-center justify-center">
|
||||
// <a
|
||||
// href="#"
|
||||
// className="block max-w-sm rounded-lg border border-gray-200 bg-white p-6 text-center shadow hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700"
|
||||
// >
|
||||
// <h5 className="mb-2 flex flex-row items-center justify-center gap-2 text-xl font-bold tracking-tight text-gray-900 dark:text-white">
|
||||
// Something went wrong
|
||||
// </h5>
|
||||
// <div className="font-normal text-gray-700 dark:text-gray-400">
|
||||
// {errorMap[error] || "Please contact us if this error persists."}
|
||||
// </div>
|
||||
// </a>
|
||||
// </div>
|
||||
// )
|
||||
// }
|
||||
"use client"
|
||||
|
||||
import {useSearchParams} from "next/navigation"
|
||||
import { useSearchParams } from "next/navigation"
|
||||
import React, { Suspense } from "react"
|
||||
|
||||
enum Error {
|
||||
Configuration = "Configuration",
|
||||
@@ -16,7 +55,7 @@ const errorMap = {
|
||||
),
|
||||
}
|
||||
|
||||
export default function AuthErrorPage() {
|
||||
function AuthErrorPageContent() {
|
||||
const search = useSearchParams()
|
||||
const error = search.get("error") as Error
|
||||
|
||||
@@ -35,4 +74,12 @@ export default function AuthErrorPage() {
|
||||
</a>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default function AuthErrorPage() {
|
||||
return (
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<AuthErrorPageContent />
|
||||
</Suspense>
|
||||
)
|
||||
}
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
"use client"
|
||||
|
||||
import {PropsWithChildren} from "react";
|
||||
import {ThemeProvider} from "@/features/theme/theme-provider";
|
||||
|
||||
import {Toaster} from "@/components/ui/sonner";
|
||||
import {QueryClient, QueryClientProvider,} from '@tanstack/react-query'
|
||||
@@ -9,9 +10,9 @@ import {SessionProvider} from "next-auth/react";
|
||||
export type ProviderProps = PropsWithChildren<{}>;
|
||||
const queryClient = new QueryClient()
|
||||
|
||||
import dynamic from 'next/dynamic';
|
||||
// import dynamic from 'next/dynamic';
|
||||
|
||||
const ThemeProvider = dynamic(() => import('@/features/theme/theme-provider'), {ssr: false});
|
||||
// const ThemeProvider = dynamic(() => import('@/features/theme/theme-provider'), {ssr: false});
|
||||
|
||||
export const Providers = (props: ProviderProps) => {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user