Skip to content

Commit

Permalink
Move useForwardedRef to new package
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasEng committed Aug 16, 2024
1 parent f4c0f5e commit e4c5ec9
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { forwardRef, useState } from 'react';
import { StudioModal, useForwardedRef } from '@studio/components';
import { StudioModal } from '@studio/components';
import { useForwardedRef } from '@studio/hooks';
import { useTranslation } from 'react-i18next';
import { useCopyAppMutation } from 'dashboard/hooks/mutations/useCopyAppMutation';
import type { AxiosError } from 'axios';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Modal } from '@digdir/designsystemet-react';
import type { ModalDialogProps } from '@digdir/designsystemet-react';
import cn from 'classnames';
import classes from './StudioModalDialog.module.css';
import { useForwardedRef } from '../../../hooks';
import { useForwardedRef } from '@studio/hooks';

export type StudioModalDialogProps = ModalDialogProps & {
children: ReactNode;
Expand Down
1 change: 0 additions & 1 deletion frontend/libs/studio-components/src/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './useForwardedRef';
export * from './useLocalStorage';
export * from './useMediaQuery';
export * from './usePrevious';
Expand Down
1 change: 1 addition & 0 deletions frontend/libs/studio-hooks/src/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './useDebounce';
export * from './useForwardedRef';
export * from './useUniqueKeys';
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React, { forwardRef, useState } from 'react';
import classes from './DeleteModal.module.css';
import { useTranslation } from 'react-i18next';
import { StudioButton, StudioModal, StudioSpinner, useForwardedRef } from '@studio/components';
import { StudioButton, StudioModal, StudioSpinner } from '@studio/components';
import { useForwardedRef } from '@studio/hooks';
import { TrashIcon } from '@studio/icons';
import { useResetRepositoryMutation } from 'app-development/hooks/mutations/useResetRepositoryMutation';
import { toast } from 'react-toastify';
Expand Down

0 comments on commit e4c5ec9

Please sign in to comment.