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() {
|
2025-01-14 21:58:16 +03:00
|
|
|
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(() => {
|
2025-01-14 21:58:16 +03:00
|
|
|
hideFooter(true);
|
|
|
|
return () => hideFooter(false);
|
|
|
|
}, [hideFooter]);
|
2024-07-28 13:07:22 +03:00
|
|
|
|
|
|
|
return (
|
2024-12-12 13:19:12 +03:00
|
|
|
<div className='cc-fade-in 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>
|
2024-12-12 13:19:12 +03:00
|
|
|
</div>
|
2024-07-28 13:07:22 +03:00
|
|
|
);
|
|
|
|
}
|