|
|
@ -30,6 +30,7 @@ import { GitHubIcon } from '../ReactIcons/GitHubIcon.tsx'; |
|
|
|
import { GoogleIcon } from '../ReactIcons/GoogleIcon.tsx'; |
|
|
|
import { GoogleIcon } from '../ReactIcons/GoogleIcon.tsx'; |
|
|
|
import { YouTubeIcon } from '../ReactIcons/YouTubeIcon.tsx'; |
|
|
|
import { YouTubeIcon } from '../ReactIcons/YouTubeIcon.tsx'; |
|
|
|
import { resourceTitleFromId } from '../../lib/roadmap.ts'; |
|
|
|
import { resourceTitleFromId } from '../../lib/roadmap.ts'; |
|
|
|
|
|
|
|
import { lockBodyScroll } from '../../lib/dom.ts'; |
|
|
|
|
|
|
|
|
|
|
|
type TopicDetailProps = { |
|
|
|
type TopicDetailProps = { |
|
|
|
resourceTitle?: string; |
|
|
|
resourceTitle?: string; |
|
|
@ -262,6 +263,8 @@ export function TopicDetail(props: TopicDetailProps) { |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
if (isActive) topicRef?.current?.focus(); |
|
|
|
if (isActive) topicRef?.current?.focus(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lockBodyScroll(isActive); |
|
|
|
}, [isActive]); |
|
|
|
}, [isActive]); |
|
|
|
|
|
|
|
|
|
|
|
if (!isActive) { |
|
|
|
if (!isActive) { |
|
|
@ -525,4 +528,4 @@ export function TopicDetail(props: TopicDetailProps) { |
|
|
|
<div className="fixed inset-0 z-30 bg-gray-900 bg-opacity-50 dark:bg-opacity-80"></div> |
|
|
|
<div className="fixed inset-0 z-30 bg-gray-900 bg-opacity-50 dark:bg-opacity-80"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |