refactor: extract common components into UI package

This commit is contained in:
David Nguyen
2023-08-23 11:22:13 +10:00
committed by Mythie
parent 98862a6356
commit a0abf56833
50 changed files with 113493 additions and 926 deletions

View File

@ -1,10 +1,9 @@
import { useCallback, useEffect, useState } from 'react';
import { getBoundingClientRect } from '@documenso/lib/client-only/get-bounding-client-rect';
import { PDF_VIEWER_PAGE_SELECTOR } from '@documenso/lib/constants/pdf-viewer';
import { Field } from '@documenso/prisma/client';
import { PDF_VIEWER_PAGE_SELECTOR } from '~/components/(dashboard)/pdf-viewer/types';
import { getBoundingClientRect } from '~/helpers/get-bounding-client-rect';
export const useFieldPageCoords = (field: Field) => {
const [coords, setCoords] = useState({
x: 0,