2024-07-28 13:07:22 +03:00
|
|
|
'use client';
|
|
|
|
|
|
|
|
import { useLayoutEffect, useMemo } from 'react';
|
|
|
|
import { TransformComponent, TransformWrapper } from 'react-zoom-pan-pinch';
|
|
|
|
|
|
|
|
import { useConceptOptions } from '@/context/ConceptOptionsContext';
|
|
|
|
import { resources } from '@/utils/constants';
|
|
|
|
|
|
|
|
function DatabaseSchemaPage() {
|
|
|
|
const { calculateHeight, setNoFooter } = useConceptOptions();
|
|
|
|
|
|
|
|
const panelHeight = useMemo(() => calculateHeight('0px'), [calculateHeight]);
|
|
|
|
|
|
|
|
useLayoutEffect(() => {
|
|
|
|
setNoFooter(true);
|
|
|
|
return () => setNoFooter(false);
|
|
|
|
}, [setNoFooter]);
|
|
|
|
|
|
|
|
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
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default DatabaseSchemaPage;
|