Skip to content

Commit 2d8fe06

Browse files
committed
useModalClose: update to named export
1 parent 366aa7e commit 2d8fe06

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

client/common/useModalClose.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useRef, useEffect } from 'react';
22
import { render, fireEvent } from '@testing-library/react';
3-
import useModalClose from './useModalClose';
3+
import { useModalClose } from './useModalClose';
44
import useKeyDownHandlers from './useKeyDownHandlers';
55

66
jest.mock('./useKeyDownHandlers');

client/common/useModalClose.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import useKeyDownHandlers from './useKeyDownHandlers';
1818
* @param passedRef - Optional ref to the modal element. If not provided, one is created internally.
1919
* @returns A ref to be attached to the modal DOM element
2020
*/
21-
export default function useModalClose(
21+
export function useModalClose(
2222
onClose: () => void,
2323
passedRef?: MutableRefObject<HTMLElement | null>
2424
): MutableRefObject<HTMLElement | null> {

client/components/Dropdown/DropdownMenu.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PropTypes from 'prop-types';
22
import React, { forwardRef, useCallback, useRef, useState } from 'react';
3-
import useModalClose from '../../common/useModalClose';
3+
import { useModalClose } from '../../common/useModalClose';
44
import DownArrowIcon from '../../images/down-filled-triangle.svg';
55
import { DropdownWrapper } from '../Dropdown';
66

client/components/Menubar/Menubar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import React, {
66
useState,
77
useEffect
88
} from 'react';
9-
import useModalClose from '../../common/useModalClose';
9+
import { useModalClose } from '../../common/useModalClose';
1010
import { MenuOpenContext, MenubarContext } from './contexts';
1111
import { usePrevious } from '../../common/usePrevious';
1212

client/modules/App/components/Overlay.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import MediaQuery from 'react-responsive';
44
import { useSelector } from 'react-redux';
55
import { useHistory } from 'react-router-dom';
66
import { useTranslation } from 'react-i18next';
7-
import useModalClose from '../../../common/useModalClose';
7+
import { useModalClose } from '../../../common/useModalClose';
88

99
import ExitIcon from '../../../images/exit.svg';
1010

client/modules/IDE/components/Modal.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import classNames from 'classnames';
22
import PropTypes from 'prop-types';
33
import React from 'react';
4-
import useModalClose from '../../../common/useModalClose';
4+
import { useModalClose } from '../../../common/useModalClose';
55
import ExitIcon from '../../../images/exit.svg';
66

77
// Common logic from NewFolderModal, NewFileModal, UploadFileModal

client/modules/User/components/CollectionShareButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
44

55
import Button from '../../../common/Button';
66
import { DropdownArrowIcon } from '../../../common/icons';
7-
import useModalClose from '../../../common/useModalClose';
7+
import { useModalClose } from '../../../common/useModalClose';
88
import CopyableInput from '../../IDE/components/CopyableInput';
99

1010
const ShareURL = ({ value }) => {

0 commit comments

Comments
 (0)