Skip to content

Commit 67d34a0

Browse files
authored
fix: User-passed props should overwrite those returned by fetchCSB (#375)
The current ordering of props destructuring prevents applying custom screenshot_url to CSBs. This quick PR fixes that.
1 parent 79d4abb commit 67d34a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/mdx/Codesandbox/Codesandbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,6 @@ export async function Codesandbox1({ boxes, ...props }: { boxes: string[] } & Co
9898
// console.log('data', data)
9999

100100
// Merge initial props with data
101-
const merged = { ...props, ...data }
101+
const merged = { ...data, ...props }
102102
return <Codesandbox0 {...merged} />
103103
}

0 commit comments

Comments
 (0)