-
Notifications
You must be signed in to change notification settings - Fork 53
Fix: minified react error on inspect routing #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| 'use client' | ||
|
|
||
| import { SandboxInspectProvider } from '@/features/dashboard/sandbox/inspect/context' | ||
| import SandboxInspectFilesystem from '@/features/dashboard/sandbox/inspect/filesystem' | ||
| import SandboxInspectViewer from '@/features/dashboard/sandbox/inspect/viewer' | ||
| import { cn } from '@/lib/utils' | ||
| import type { EntryInfo } from 'e2b' | ||
|
|
||
| interface SandboxInspectViewProps { | ||
| rootPath: string | ||
| seedEntries: EntryInfo[] | ||
| } | ||
|
|
||
| export default function SandboxInspectView({ | ||
| rootPath, | ||
| seedEntries, | ||
| }: SandboxInspectViewProps) { | ||
| return ( | ||
| <SandboxInspectProvider rootPath={rootPath} seedEntries={seedEntries}> | ||
| <div | ||
| className={cn( | ||
| 'flex flex-1 gap-4 overflow-hidden p-3 md:p-6', | ||
| 'max-md:sticky max-md:top-0 max-md:min-h-[calc(100vh-var(--protected-navbar-height))]' | ||
| )} | ||
| > | ||
| <SandboxInspectFilesystem rootPath={rootPath} /> | ||
| <SandboxInspectViewer /> | ||
| </div> | ||
| </SandboxInspectProvider> | ||
| ) | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| 'use client' | ||
|
|
||
| import { useShikiTheme } from '@/configs/shiki' | ||
| import { cn } from '@/lib/utils' | ||
| import { | ||
|
|
@@ -13,10 +15,16 @@ import { ScrollArea, ScrollBar } from './primitives/scroll-area' | |
| interface JsonPopoverProps { | ||
| json: unknown | ||
| children: React.ReactNode | ||
| buttonProps?: React.ComponentPropsWithoutRef<typeof Button> | ||
| className?: string | ||
| } | ||
|
|
||
| export function JsonPopover({ json, children, className }: JsonPopoverProps) { | ||
| export function JsonPopover({ | ||
| json, | ||
| children, | ||
| buttonProps, | ||
| className, | ||
| }: JsonPopoverProps) { | ||
| const [isOpen, setIsOpen] = useState(false) | ||
|
|
||
| const shikiTheme = useShikiTheme() | ||
|
|
@@ -41,6 +49,7 @@ export function JsonPopover({ json, children, className }: JsonPopoverProps) { | |
| e.preventDefault() | ||
| setIsOpen(true) | ||
| }} | ||
| {...buttonProps} | ||
ben-fornefeld marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Event handlers in buttonProps override critical popover handlersThe
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. expected |
||
| > | ||
| {children} | ||
| </Button> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.