From 84fabe6690f02d31d7c4a7db6823f449288a7369 Mon Sep 17 00:00:00 2001 From: maany Date: Sun, 4 Aug 2024 11:58:09 +0200 Subject: [PATCH] auth, list-research-context: use kp credentials from session #7 --- .../_components/list-research-contexts.tsx | 18 ++------ src/app/page.tsx | 41 +++++++++-------- src/lib/core/dto/auth-dto.ts | 14 +++++- .../secondary/auth-gateway-output-port.ts | 3 +- .../server/config/auth/next-auth-config.ts | 7 ++- .../server/gateway/next-auth-gateway.ts | 46 +++++++++++++++---- 6 files changed, 85 insertions(+), 44 deletions(-) diff --git a/src/app/_components/list-research-contexts.tsx b/src/app/_components/list-research-contexts.tsx index 22dc696..5cc18d4 100644 --- a/src/app/_components/list-research-contexts.tsx +++ b/src/app/_components/list-research-contexts.tsx @@ -9,15 +9,11 @@ export type ListResearchContextsPageProps = { researchContexts: ResearchContext[]; kernelPlancksterHost: string; }; - const IdiotPage = ({children}: {children: React.ReactNode}) => { - return ( -
- {children} -
- ) - } + export function ListResearchContextsPage(props: ListResearchContextsPageProps) { - const api = clientContainer.get(TRPC.REACT_CLIENT_COMPONENTS_API); + const api = clientContainer.get( + TRPC.REACT_CLIENT_COMPONENTS_API, + ); const addNewContextMutation = api.kernel.researchContext.create.useMutation({ onSuccess: () => { // TODO: handle success @@ -25,14 +21,8 @@ export function ListResearchContextsPage(props: ListResearchContextsPageProps) { }, }); - const MySecyButton = () return (
- - {MySecyButton} -