Skip to content

Commit 8dacc7e

Browse files
committed
chore: change imports from @headlessui/react
1 parent 51e72ab commit 8dacc7e

File tree

14 files changed

+54
-14
lines changed

14 files changed

+54
-14
lines changed

src/app/creator/Tabs.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616

1717
'use client';
1818

19-
import { Disclosure } from '@headlessui/react';
2019
import { ChevronUpIcon } from '@heroicons/react/20/solid';
2120
import clsx from 'clsx';
2221
import Link from 'next/link';
2322
import { usePathname } from 'next/navigation';
2423

24+
import { Disclosure } from '@/components/control';
25+
2526
const menus = [
2627
{
2728
name: 'Learn',

src/app/dashboard/hire/page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
'use client';
1818

19-
import { Popover, Transition } from '@headlessui/react';
2019
import { useConnectModal } from '@rainbow-me/rainbowkit';
2120
import { readContract } from '@wagmi/core';
2221
import Image from 'next/image';
@@ -25,6 +24,7 @@ import { useEffect, useState, Fragment, useCallback } from 'react';
2524
import { toast } from 'react-toastify';
2625
import { useWalletClient, useNetwork, useSwitchNetwork, useAccount } from 'wagmi';
2726

27+
import { Popover, Transition } from '@/components/control';
2828
import {
2929
EditIcon,
3030
ManageIcon,

src/app/learn/[type]/[id]/RightCard.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616

1717
'use client';
1818

19-
// import { getBalance } from '@wagmi/core'
20-
// import { prepareWriteContract, writeContract } from '@wagmi/core'
21-
import { Dialog, Transition } from '@headlessui/react';
2219
import { CheckIcon } from '@heroicons/react/20/solid';
2320
import { useConnectModal } from '@rainbow-me/rainbowkit';
2421
import { waitForTransaction } from '@wagmi/core';
@@ -38,6 +35,9 @@ import { toast } from 'react-toastify';
3835
import { useAccount, useNetwork, useSwitchNetwork, erc20ABI } from 'wagmi';
3936

4037
import { Button } from '@/components/Button';
38+
// import { getBalance } from '@wagmi/core'
39+
// import { prepareWriteContract, writeContract } from '@wagmi/core'
40+
import { Dialog, Transition } from '@/components/control';
4141
import { USDTIcon } from '@/components/Icons';
4242
import { TwitterIcon, DownloadIcon } from '@/components/Icons';
4343
import { formatTime } from '@/utils/date';

src/app/learn/[type]/[id]/[chapter_id]/Menu.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717
/* eslint-disable jsx-a11y/anchor-is-valid */
1818
'use client';
1919

20-
import { Transition } from '@headlessui/react';
2120
import { ListBulletIcon } from '@heroicons/react/24/outline';
2221
import clsx from 'clsx';
2322
import { useEffect, useState } from 'react';
2423

24+
import { Transition } from '@/components/control';
25+
2526
export function Menu() {
2627
const [anchors, setAnchors] = useState([]);
2728
const [isOpen, setIsOpen] = useState(false);

src/app/profile/MySkill.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { UploadIcon } from '@/components/Icons';
2323
import Loader from '@/components/Loader';
2424
import { Select } from '@/components/Select';
2525
import { ReactSelect } from '@/components/Select/ReactSelect';
26-
// import { Transition } from '@headlessui/react'
26+
// import { Transition } from '@/components/control';
2727
// import { CheckIcon, XMarkIcon } from '@heroicons/react/20/solid'
2828
import { BASE_INPUT_STYLE } from '@/constants/config';
2929
import { classNames } from '@/utils';

src/app/profile/SelectCountry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { Listbox, Transition } from '@headlessui/react';
1817
import { ChevronDownIcon, CheckIcon, XMarkIcon } from '@heroicons/react/20/solid';
1918
import { Fragment } from 'react';
2019

20+
import { Listbox, Transition } from '@/components/control';
2121
import { classNames } from '@/utils';
2222

2323
import { countries } from '#/lib/countries';

src/entry/layouts/default/BindEmailModal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
'use client';
1818

19-
import { Dialog, Transition } from '@headlessui/react';
2019
import { ArrowRightOnRectangleIcon, XMarkIcon } from '@heroicons/react/20/solid';
2120
import { disconnect } from '@wagmi/core';
2221
import { useSession, signOut } from 'next-auth/react';
@@ -27,6 +26,7 @@ import { toast } from 'react-toastify';
2726
import isEmail from 'validator/lib/isEmail';
2827
import { useAccount } from 'wagmi';
2928

29+
import { Dialog, Transition } from '@/components/control';
3030
import Loader from '@/components/Loader';
3131
import { shortenAddress } from '@/utils';
3232

src/shared/components/Modal/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { Dialog, Transition } from '@headlessui/react';
1817
import clsx from 'clsx';
1918
import React, { Fragment } from 'react';
2019

2120
import { isFunction } from '../../utils';
21+
import { Dialog, Transition } from '../control/headlessui';
2222

2323
export function Modal({
2424
isOpen,

src/shared/components/Popover/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { Popover as HeadlessuiPopover } from '@headlessui/react';
1817
import React, { Fragment, useCallback, useEffect, useState } from 'react';
1918
import ReactDOM from 'react-dom';
2019
import { usePopper } from 'react-popper';
2120

2221
import useInterval from '@/hooks/useInterval';
2322
import { classNames } from '@/utils';
2423

24+
import { Popover as HeadlessuiPopover } from '../control/headlessui';
25+
2526
export default function Popover({ content, children, placement = 'auto', show, modifiers }) {
2627
const [referenceElement, setReferenceElement] = useState(null);
2728
const [popperElement, setPopperElement] = useState(null);

src/shared/components/Select/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616

1717
'use client';
1818

19-
import { Listbox, Transition } from '@headlessui/react';
2019
import { ChevronDownIcon, XMarkIcon } from '@heroicons/react/20/solid';
2120
import clsx from 'clsx';
2221
import Image from 'next/image';
2322
import { Fragment } from 'react';
2423

2524
import { classNames } from '@/utils';
2625

26+
import { Listbox, Transition } from '../control/headlessui';
27+
2728
export function Select({ placeholder, options, selected, change, className, hasArrow = true }) {
2829
return (
2930
<Listbox onChange={change}>

0 commit comments

Comments
 (0)