2024-09-23 10:33:47 +03:00
|
|
|
'use client';
|
|
|
|
|
2024-06-07 20:17:03 +03:00
|
|
|
import AnimateFade from '@/components/wrap/AnimateFade';
|
2024-09-23 10:33:47 +03:00
|
|
|
import { useConceptOptions } from '@/context/ConceptOptionsContext';
|
2024-06-07 20:17:03 +03:00
|
|
|
import { HelpTopic } from '@/models/miscellaneous';
|
|
|
|
import TopicPage from '@/pages/ManualsPage/TopicPage';
|
|
|
|
|
|
|
|
interface ViewTopicProps {
|
|
|
|
topic: HelpTopic;
|
|
|
|
}
|
|
|
|
|
|
|
|
function ViewTopic({ topic }: ViewTopicProps) {
|
2024-09-23 10:33:47 +03:00
|
|
|
const { mainHeight } = useConceptOptions();
|
2024-06-07 20:17:03 +03:00
|
|
|
return (
|
2024-09-23 10:33:47 +03:00
|
|
|
<AnimateFade key={topic} className='py-2 px-6 sm:px-12 overflow-y-auto' style={{ maxHeight: mainHeight }}>
|
2024-06-07 20:17:03 +03:00
|
|
|
<TopicPage topic={topic} />
|
|
|
|
</AnimateFade>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ViewTopic;
|