mirror of
https://github.com/vercel/commerce.git
synced 2025-07-25 11:11:24 +00:00
revert lib/utils refactoring
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ChevronRightIcon, EllipsisHorizontalIcon } from '@heroicons/react/16/solid';
|
||||
import { cn } from 'lib/shopify/utils';
|
||||
import { cn } from 'lib/utils';
|
||||
import Link, { LinkProps } from 'next/link';
|
||||
import { ComponentPropsWithoutRef, ReactNode, forwardRef } from 'react';
|
||||
|
||||
|
@@ -8,7 +8,7 @@ import {
|
||||
BreadcrumbPage,
|
||||
BreadcrumbSeparator
|
||||
} from './breadcrumb-list';
|
||||
import { findParentCollection } from 'lib/shopify/utils';
|
||||
import { findParentCollection } from 'lib/utils';
|
||||
|
||||
type BreadcrumbProps = {
|
||||
type: 'product' | 'collection';
|
||||
|
@@ -2,7 +2,7 @@ import { PlusIcon } from '@heroicons/react/16/solid';
|
||||
import Price from 'components/price';
|
||||
import { DEFAULT_OPTION } from 'lib/constants';
|
||||
import { CartItem } from 'lib/shopify/types';
|
||||
import { createUrl } from 'lib/shopify/utils';
|
||||
import { createUrl } from 'lib/utils';
|
||||
import Image from 'next/image';
|
||||
import Link from 'next/link';
|
||||
import { DeleteItemButton } from './delete-item-button';
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
import { CheckIcon } from '@heroicons/react/24/outline';
|
||||
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
||||
import { cn } from 'lib/shopify/utils';
|
||||
import { cn } from 'lib/utils';
|
||||
import { forwardRef } from 'react';
|
||||
|
||||
const Checkbox = forwardRef<
|
||||
|
@@ -3,7 +3,7 @@
|
||||
import { Button } from '@headlessui/react';
|
||||
import { MAKE_FILTER_ID, MODEL_FILTER_ID, PART_TYPES, YEAR_FILTER_ID } from 'lib/constants';
|
||||
import { Menu, Metaobject } from 'lib/shopify/types';
|
||||
import { createUrl, findParentCollection } from 'lib/shopify/utils';
|
||||
import { createUrl, findParentCollection } from 'lib/utils';
|
||||
import get from 'lodash.get';
|
||||
import { useParams, useRouter, useSearchParams } from 'next/navigation';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { MagnifyingGlassIcon } from '@heroicons/react/24/outline';
|
||||
import { createUrl } from 'lib/shopify/utils';
|
||||
import { createUrl } from 'lib/utils';
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
|
||||
export default function Search() {
|
||||
|
@@ -3,7 +3,7 @@ import { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/react
|
||||
import { ChevronDownIcon } from '@heroicons/react/24/outline';
|
||||
import clsx from 'clsx';
|
||||
import { Filter, FilterType } from 'lib/shopify/types';
|
||||
import { createUrl } from 'lib/shopify/utils';
|
||||
import { createUrl } from 'lib/utils';
|
||||
import { usePathname, useRouter, useSearchParams } from 'next/navigation';
|
||||
import PriceRange from './price-range';
|
||||
import SelectedList from './selected-list';
|
||||
|
@@ -3,7 +3,7 @@
|
||||
import Price from 'components/price';
|
||||
import { useDebounce } from 'hooks';
|
||||
import { Filter } from 'lib/shopify/types';
|
||||
import { createUrl } from 'lib/shopify/utils';
|
||||
import { createUrl } from 'lib/utils';
|
||||
import get from 'lodash.get';
|
||||
import { usePathname, useRouter, useSearchParams } from 'next/navigation';
|
||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
import { XMarkIcon } from '@heroicons/react/16/solid';
|
||||
import { Filter } from 'lib/shopify/types';
|
||||
import { createUrl } from 'lib/shopify/utils';
|
||||
import { createUrl } from 'lib/utils';
|
||||
import { usePathname, useRouter, useSearchParams } from 'next/navigation';
|
||||
|
||||
const SelectedList = ({ filters }: { filters: Filter[] }) => {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import clsx from 'clsx';
|
||||
import { SortFilterItem } from 'lib/constants';
|
||||
import { createUrl } from 'lib/shopify/utils';
|
||||
import { createUrl } from 'lib/utils';
|
||||
import Link from 'next/link';
|
||||
import { usePathname, useSearchParams } from 'next/navigation';
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
import { ArrowRightIcon } from '@heroicons/react/16/solid';
|
||||
import { MAKE_FILTER_ID } from 'lib/constants';
|
||||
import { Metaobject } from 'lib/shopify/types';
|
||||
import { createUrl } from 'lib/shopify/utils';
|
||||
import { createUrl } from 'lib/utils';
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
|
||||
const ButtonGroup = ({ manufacturer }: { manufacturer: Metaobject }) => {
|
||||
|
@@ -6,7 +6,7 @@ import Price from 'components/price';
|
||||
import SideDialog from 'components/side-dialog';
|
||||
import { CORE_VARIANT_ID_KEY, CORE_WAIVER } from 'lib/constants';
|
||||
import { CoreChargeOption, ProductVariant } from 'lib/shopify/types';
|
||||
import { cn, createUrl } from 'lib/shopify/utils';
|
||||
import { cn, createUrl } from 'lib/utils';
|
||||
import { usePathname, useRouter, useSearchParams } from 'next/navigation';
|
||||
import { useState } from 'react';
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
import { ArrowLeftIcon, ArrowRightIcon } from '@heroicons/react/24/outline';
|
||||
import { TileImage } from 'components/grid/tile';
|
||||
import { createUrl } from 'lib/shopify/utils';
|
||||
import { createUrl } from 'lib/utils';
|
||||
import Image from 'next/image';
|
||||
import Link from 'next/link';
|
||||
import { usePathname, useSearchParams } from 'next/navigation';
|
||||
|
@@ -6,7 +6,7 @@ import clsx from 'clsx';
|
||||
import Price from 'components/price';
|
||||
import { CORE_VARIANT_ID_KEY, CORE_WAIVER } from 'lib/constants';
|
||||
import { CoreChargeOption, Money, ProductOption, ProductVariant } from 'lib/shopify/types';
|
||||
import { createUrl } from 'lib/shopify/utils';
|
||||
import { createUrl } from 'lib/utils';
|
||||
import { usePathname, useRouter, useSearchParams } from 'next/navigation';
|
||||
import { Fragment, useEffect, useState } from 'react';
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import Price from 'components/price';
|
||||
import { cn } from 'lib/shopify/utils';
|
||||
import { cn } from 'lib/utils';
|
||||
import { ReactNode, useState } from 'react';
|
||||
|
||||
const options = ['Included', 'Premium Labor', '+1 Year'] as const;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { cn } from 'lib/shopify/utils';
|
||||
import { cn } from 'lib/utils';
|
||||
import { ITooltip, Tooltip as ReactTooltip } from 'react-tooltip';
|
||||
|
||||
const Tooltip = ({ id, children, className }: ITooltip) => {
|
||||
|
Reference in New Issue
Block a user