Skip to content

Commit

Permalink
.,.
Browse files Browse the repository at this point in the history
  • Loading branch information
igalklebanov committed Oct 12, 2024
1 parent ec9d914 commit e3cb081
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
14 changes: 9 additions & 5 deletions site/src/components/Playground.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
import { useRef } from 'react'
import { useColorMode } from '../hooks/use-color-mode'
import { useColorMode } from '@docusaurus/theme-common'
import { useEffect, useState } from 'react'
import styles from './Playground.module.css'

export function Playground(props: PlaygroundProps) {
const playgroundRef = useRef(null)
const params = usePlaygroundParams(props.disableIframeMode)
const [src, setSrc] = useState('')

useEffect(() => {
setSrc(`https://kyse.link/?${params}${getPlaygroundStateHash(props)}`)
}, [])

return (
<iframe
allow="clipboard-write"
autoFocus
className={styles.playground}
ref={playgroundRef}
src={`https://kyse.link/?${params}${getPlaygroundStateHash(props)}`}
src={src}
/>
)
}
Expand Down
7 changes: 0 additions & 7 deletions site/src/hooks/use-color-mode.ts

This file was deleted.

0 comments on commit e3cb081

Please sign in to comment.