Skip to content

Commit cd142f9

Browse files
committed
[BLD-28] Dashboard: Fix error style in contract explorer (#7763)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on refactoring the error display section within the `InteractiveAbiFunction` component to enhance readability and styling. ### Detailed summary - Removed the import of `InlineCode`. - Changed the error display from a fragment (`<>`) to a `div`. - Updated the error heading to include a bottom margin (`mb-2`). - Replaced `InlineCode` with `PlainTextCodeBlock` for error formatting. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Updated the visual appearance of error messages in the interactive ABI function section for improved readability, using a new code block style with enhanced formatting. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent cfea3b3 commit cd142f9

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

apps/dashboard/src/@/components/contracts/functions/interactive-abi-function.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import { Badge } from "@/components/ui/badge";
3030
import { Button } from "@/components/ui/button";
3131
import { CodeClient } from "@/components/ui/code/code.client";
3232
import { PlainTextCodeBlock } from "@/components/ui/code/plaintext-code";
33-
import { InlineCode } from "@/components/ui/inline-code";
3433
import { Input } from "@/components/ui/input";
3534
import { Spinner } from "@/components/ui/Spinner/Spinner";
3635
import { Skeleton } from "@/components/ui/skeleton";
@@ -414,14 +413,13 @@ export const InteractiveAbiFunction: React.FC<InteractiveAbiFunctionProps> = (
414413
)}
415414

416415
{error ? (
417-
<>
418-
<h3 className="text-sm font-medium">Error</h3>
419-
<InlineCode
420-
className="relative w-full whitespace-pre-wrap rounded-md border border-border p-4 text-red-500"
421-
// biome-ignore lint/suspicious/noExplicitAny: FIXME
422-
code={formatError(error as any)}
416+
<div>
417+
<h3 className="text-sm font-medium mb-2">Error</h3>
418+
<PlainTextCodeBlock
419+
className="text-red-500 bg-background"
420+
code={formatError(error)}
423421
/>
424-
</>
422+
</div>
425423
) : readLoading ? (
426424
<Skeleton className="h-20 w-full rounded-lg" />
427425
) : formattedResponseData ? (

0 commit comments

Comments
 (0)