'use client' import { type FC, useEffect } from 'react' import { useContext } from 'use-context-selector' import TemplateEn from './template/template.en.mdx' import TemplateZh from './template/template.zh.mdx' import I18n from '@/context/i18n' import { LanguagesSupported } from '@/i18n/language' type DocProps = { apiBaseUrl: string } const Doc: FC = ({ apiBaseUrl, }) => { const { locale } = useContext(I18n) useEffect(() => { const hash = location.hash if (hash) document.querySelector(hash)?.scrollIntoView() }, []) return (
{ locale !== LanguagesSupported[1] ? : }
) } export default Doc