From bf9a469032e8649e8d824aa5407cb111b3322ca3 Mon Sep 17 00:00:00 2001 From: jhnnsrs Date: Tue, 12 Sep 2023 16:12:26 +0200 Subject: [PATCH] pubiiii --- src/repo/repo-provider.tsx | 2 +- src/screens/wizard/fields/ChannelSelectionField.tsx | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/repo/repo-provider.tsx b/src/repo/repo-provider.tsx index aa4309a..aca3dff 100644 --- a/src/repo/repo-provider.tsx +++ b/src/repo/repo-provider.tsx @@ -46,7 +46,7 @@ export const RepoProvider: React.FC<{ children: React.ReactNode }> = ({ } catch (e) { if (e instanceof ValidationError) { - setErrorRepos(errors => [...errors, {repo: repoResult.name || "unknown", errors: e.inner}]); + setErrorRepos(errors => [...errors, {repo: repoResult.repo || "unknown", errors: e.inner}]); } console.error(e); } diff --git a/src/screens/wizard/fields/ChannelSelectionField.tsx b/src/screens/wizard/fields/ChannelSelectionField.tsx index 87dff3c..0a9050f 100644 --- a/src/screens/wizard/fields/ChannelSelectionField.tsx +++ b/src/screens/wizard/fields/ChannelSelectionField.tsx @@ -1,7 +1,8 @@ import { useField } from "formik"; import { Badge } from "../../../components/ui/badge"; -import { Card } from "../../../components/ui/card"; +import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../../../components/ui/card"; import { Channel, useRepo } from "../../../repo/repo-context"; +import { ScrollArea } from "../../../components/ui/scroll-area"; export const ChannelSelectionField = ({ ...props }: any) => { const [field, meta, helpers] = useField(props); @@ -47,10 +48,11 @@ export const ChannelSelectionField = ({ ...props }: any) => { ); })} -
- {errors.map((e) =>
{e.repo} -
{e.errors.map((e) =>
{e.path} {e.message}
)}
)} -
+ {errors.length > 0 &&
+ {errors.map((e) => ErrorThe repo {e.repo} is faulty + {e.errors.map((e) =>
{e.path} {e.message}
)}
+ Tell these errors to the Repo Owner
)} +
} {meta.touched && meta.error ? (
{meta.error}