ConceptPortal-public/rsconcept/frontend/src/pages/ManualsPage/ViewTopic.tsx

22 lines
602 B
TypeScript
Raw Normal View History

2024-09-23 10:34:14 +03:00
'use client';
2024-03-20 15:27:32 +03:00
import AnimateFade from '@/components/wrap/AnimateFade';
2024-09-23 10:34:14 +03:00
import { useConceptOptions } from '@/context/ConceptOptionsContext';
2023-12-26 14:23:51 +03:00
import { HelpTopic } from '@/models/miscellaneous';
import TopicPage from '@/pages/ManualsPage/TopicPage';
2023-08-23 18:11:42 +03:00
interface ViewTopicProps {
2023-12-28 14:04:44 +03:00
topic: HelpTopic;
2023-08-23 18:11:42 +03:00
}
function ViewTopic({ topic }: ViewTopicProps) {
2024-09-23 10:34:14 +03:00
const { mainHeight } = useConceptOptions();
2023-08-23 18:11:42 +03:00
return (
2024-09-23 10:34:14 +03:00
<AnimateFade key={topic} className='py-2 px-6 sm:px-12 overflow-y-auto' style={{ maxHeight: mainHeight }}>
2024-05-16 22:39:28 +03:00
<TopicPage topic={topic} />
2024-01-07 03:29:16 +03:00
</AnimateFade>
2023-12-28 14:04:44 +03:00
);
2023-08-23 18:11:42 +03:00
}
2023-12-28 14:04:44 +03:00
export default ViewTopic;