// Component for {% interactive-block %} markdoc tag. Used in legacy interactive // tutorials; not recommended for new tutorials. import * as React from 'react' import { useLocation } from 'react-router-dom' import dynamicReact from '@markdoc/markdoc/dist/react' import { idify } from '../helpers' export default function InteractiveBlock(props: { children: React.ReactNode label: string steps: string[] }) { const stepId = idify(props.label) const { pathname } = useLocation() return ( // add key={pathname} to ensure old step state gets rerendered on page navigation