Skip to content

Commit 73b04d8

Browse files
committed
fix: handle overflowing amount of errors
1 parent 0356bfb commit 73b04d8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Preview.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ export const Preview: FC = () => {
128128
</p>
129129
<div className="flex flex-col gap-2">
130130
{output.parser_logs?.map((log, index) => (
131-
<p key={index} className="-indent-4 pl-4 text-content-primary">
131+
<p
132+
key={index}
133+
className="-indent-4 pl-4 text-content-primary"
134+
>
132135
{log.time} {log.level}: {log.msg} - {log.err}
133136
</p>
134137
))}
@@ -208,7 +211,7 @@ const ErrorPane = () => {
208211
<div
209212
role="alertdialog"
210213
className={cn(
211-
"absolute bottom-0 left-0 w-full",
214+
"absolute bottom-0 left-0 flex max-h-[60%] w-full flex-col justify-start",
212215
$errors.show && "h-auto",
213216
)}
214217
>
@@ -223,13 +226,10 @@ const ErrorPane = () => {
223226
<div
224227
aria-hidden={!$errors.show}
225228
className={cn(
226-
"flex h-full flex-col gap-6 bg-surface-secondary p-6",
229+
"flex flex-col gap-6 overflow-y-scroll bg-surface-secondary p-6",
227230
!$errors.show && "pointer-events-none h-0 p-0",
228231
)}
229232
>
230-
<p className="font-semibold text-content-primary text-xl">
231-
An error has occurred
232-
</p>
233233
<div className="flex w-full flex-col gap-3">
234234
{$errors.diagnostics.map((diagnostic, index) => (
235235
<ErrorBlock diagnostic={diagnostic} key={index} />

0 commit comments

Comments
 (0)