ConceptPortal-public/rsconcept/frontend/src/features/home/database-schema-page.tsx

28 lines
838 B
TypeScript
Raw Normal View History

2024-07-28 13:07:22 +03:00
'use client';
2025-02-15 18:33:05 +03:00
import { useLayoutEffect } from 'react';
2024-07-28 13:07:22 +03:00
import { TransformComponent, TransformWrapper } from 'react-zoom-pan-pinch';
2025-03-12 11:55:43 +03:00
import { useAppLayoutStore, useFitHeight } from '@/stores/app-layout';
2024-07-28 13:07:22 +03:00
import { resources } from '@/utils/constants';
2025-01-29 23:18:20 +03:00
export function Component() {
const hideFooter = useAppLayoutStore(state => state.hideFooter);
const panelHeight = useFitHeight('0px');
2024-07-28 13:07:22 +03:00
2025-02-15 18:33:05 +03:00
useLayoutEffect(() => {
hideFooter(true);
return () => hideFooter(false);
}, [hideFooter]);
2024-07-28 13:07:22 +03:00
return (
2025-04-29 13:33:39 +03:00
<div className='flex justify-center overflow-hidden' style={{ maxHeight: panelHeight }}>
2024-07-28 13:07:22 +03:00
<TransformWrapper>
<TransformComponent>
<img alt='Схема базы данных' src={resources.db_schema} className='w-fit h-fit' />
</TransformComponent>
</TransformWrapper>
</div>
2024-07-28 13:07:22 +03:00
);
}