Update all imports to use @ relative

This commit is contained in:
Rami Bitar
2026-05-02 09:42:07 -04:00
parent 7348e430c0
commit a915b729b9
64 changed files with 143 additions and 143 deletions

View File

@@ -1,9 +1,9 @@
'use client';
import React from 'react';
import { useShopifyCart, redirectToCheckout } from '~/editor/hooks/use-shopify-cart';
import { Button } from '~/editor/components/ui/button';
import { Spinner } from '~/editor/components/ui/spinner';
import { useShopifyCart, redirectToCheckout } from '@/editor/hooks/use-shopify-cart';
import { Button } from '@/editor/components/ui/button';
import { Spinner } from '@/editor/components/ui/spinner';
import {
Sheet,
SheetContent,
@@ -11,7 +11,7 @@ import {
SheetTitle,
SheetBody,
AnimatePresence,
} from '~/editor/components/ui/sheet';
} from '@/editor/components/ui/sheet';
const CartDrawer: React.FC = () => {
const { isOpen, closeCart, items, itemCount, totalAmount, checkoutUrl, loading, removeItem, updateItemQuantity } = useShopifyCart();

View File

@@ -1,6 +1,6 @@
import React from 'react';
// local link - plain anchor
import { Card, CardContent } from '~/editor/components/ui/card';
import { Card, CardContent } from '@/editor/components/ui/card';
interface CollectionImage {
url: string;

View File

@@ -1,7 +1,7 @@
'use client';
import React from 'react';
import { useCollectionProducts } from '~/editor/hooks/use-shopify-collections';
import { useCollectionProducts } from '@/editor/hooks/use-shopify-collections';
import ProductCard from './product-card';
const CollectionDetail: React.FC<{ handle?: string }> = ({ handle: handleProp }) => {

View File

@@ -1,9 +1,9 @@
import { ComponentConfig } from "@reacteditor/core";
import { useEffect, useState } from "react";
import { FolderOpen } from "lucide-react";
import { shopifyFetch } from "~/editor/services/shopify/client";
import { GET_COLLECTIONS_QUERY } from "~/editor/graphql/collections";
import { Typography } from "~/editor/theme/Typography";
import { shopifyFetch } from "@/editor/services/shopify/client";
import { GET_COLLECTIONS_QUERY } from "@/editor/graphql/collections";
import { Typography } from "@/editor/theme/Typography";
export type CollectionGridProps = {
tagline: string;

View File

@@ -1,9 +1,9 @@
import { ComponentConfig } from "@reacteditor/core";
import { FolderOpen } from "lucide-react";
import type { ShopifyCollection } from "@reacteditor/field-shopify";
import { useCollectionProducts } from "~/editor/hooks/use-shopify-collections";
import { useCollectionProducts } from "@/editor/hooks/use-shopify-collections";
import { ProductCard } from "./product-card";
import { Typography } from "~/editor/theme/Typography";
import { Typography } from "@/editor/theme/Typography";
export type CollectionProps = {
collection: ShopifyCollection | null;

View File

@@ -1,7 +1,7 @@
'use client';
import React from 'react';
import { useCollections } from '~/editor/hooks/use-shopify-collections';
import { useCollections } from '@/editor/hooks/use-shopify-collections';
import CollectionCard from './collection-card';
const Collections: React.FC = () => {

View File

@@ -1,9 +1,9 @@
import { ComponentConfig } from "@reacteditor/core";
import { Star } from "lucide-react";
import type { ShopifyProduct } from "@reacteditor/field-shopify";
import { useProduct } from "~/editor/hooks/use-shopify-products";
import { useShopifyCart } from "~/editor/hooks/use-shopify-cart";
import { Typography } from "~/editor/theme/Typography";
import { useProduct } from "@/editor/hooks/use-shopify-products";
import { useShopifyCart } from "@/editor/hooks/use-shopify-cart";
import { Typography } from "@/editor/theme/Typography";
export type FeaturedProductProps = {
product: ShopifyProduct | null;

View File

@@ -2,13 +2,13 @@
import React, { useState, useEffect } from 'react';
// local link - plain anchor
import { useProduct, type Product } from '~/editor/hooks/use-shopify-products';
import { useShopifyCart } from '~/editor/hooks/use-shopify-cart';
import { useProduct, type Product } from '@/editor/hooks/use-shopify-products';
import { useShopifyCart } from '@/editor/hooks/use-shopify-cart';
import ProductDetailGallery from './product-detail-gallery';
import ProductDetailInfo from './product-detail-info';
import ProductRecommendations from './product-recommendations';
import { Button } from '~/editor/components/ui/button';
import { Alert, AlertTitle, AlertDescription } from '~/editor/components/ui/alert';
import { Button } from '@/editor/components/ui/button';
import { Alert, AlertTitle, AlertDescription } from '@/editor/components/ui/alert';
import {
Breadcrumb,
BreadcrumbList,
@@ -16,7 +16,7 @@ import {
BreadcrumbLink,
BreadcrumbPage,
BreadcrumbSeparator,
} from '~/editor/components/ui/breadcrumb';
} from '@/editor/components/ui/breadcrumb';
interface ProductVariant {
id: string;

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { Button } from '~/editor/components/ui/button';
import { Button } from '@/editor/components/ui/button';
interface ProductImage {
url: string;

View File

@@ -1,8 +1,8 @@
import React from 'react';
import { Product, ProductVariant } from './index.tsx';
import { Button } from '~/editor/components/ui/button';
import { Badge } from '~/editor/components/ui/badge';
import { Spinner } from '~/editor/components/ui/spinner';
import { Button } from '@/editor/components/ui/button';
import { Badge } from '@/editor/components/ui/badge';
import { Spinner } from '@/editor/components/ui/spinner';
interface ProductDetailInfoProps {
product: Product;

View File

@@ -1,7 +1,7 @@
'use client';
import React from 'react';
import { useProductRecommendations } from '~/editor/hooks/use-shopify-products';
import { useProductRecommendations } from '@/editor/hooks/use-shopify-products';
import ProductCard from '../product-card';
interface ProductRecommendationsProps {

View File

@@ -2,9 +2,9 @@ import { ComponentConfig } from "@reacteditor/core";
import { useEffect, useState } from "react";
import { Package } from "lucide-react";
import type { ShopifyProduct } from "@reacteditor/field-shopify";
import { useProduct } from "~/editor/hooks/use-shopify-products";
import { useShopifyCart } from "~/editor/hooks/use-shopify-cart";
import { Typography } from "~/editor/theme/Typography";
import { useProduct } from "@/editor/hooks/use-shopify-products";
import { useShopifyCart } from "@/editor/hooks/use-shopify-cart";
import { Typography } from "@/editor/theme/Typography";
export type ProductDetailsProps = {
product: ShopifyProduct | null;

View File

@@ -2,17 +2,17 @@ import { ComponentConfig } from "@reacteditor/core";
import { useEffect, useState } from "react";
import { GalleryHorizontalEnd } from "lucide-react";
import type { ShopifyCollection } from "@reacteditor/field-shopify";
import { getProducts } from "~/editor/hooks/use-shopify-products";
import { getCollectionProducts } from "~/editor/hooks/use-shopify-collections";
import { getProducts } from "@/editor/hooks/use-shopify-products";
import { getCollectionProducts } from "@/editor/hooks/use-shopify-collections";
import { ProductCard } from "./product-card";
import { Typography } from "~/editor/theme/Typography";
import { Typography } from "@/editor/theme/Typography";
import {
Carousel,
CarouselContent,
CarouselItem,
CarouselNext,
CarouselPrevious,
} from "~/editor/components/ui/carousel";
} from "@/editor/components/ui/carousel";
export type ProductsCarouselProps = {
collection: ShopifyCollection | null;

View File

@@ -2,10 +2,10 @@ import { ComponentConfig } from "@reacteditor/core";
import { useEffect, useState } from "react";
import { LayoutGrid } from "lucide-react";
import type { ShopifyCollection } from "@reacteditor/field-shopify";
import { getProducts } from "~/editor/hooks/use-shopify-products";
import { getCollectionProducts } from "~/editor/hooks/use-shopify-collections";
import { getProducts } from "@/editor/hooks/use-shopify-products";
import { getCollectionProducts } from "@/editor/hooks/use-shopify-collections";
import { ProductCard } from "./product-card";
import { Typography } from "~/editor/theme/Typography";
import { Typography } from "@/editor/theme/Typography";
export type ProductsGridProps = {
collection: ShopifyCollection | null;

View File

@@ -2,9 +2,9 @@
import React, { useState, useEffect } from 'react';
import ProductCard from './product-card';
import { getProducts } from '~/editor/hooks/use-shopify-products';
import { Button } from '~/editor/components/ui/button';
import { Spinner } from '~/editor/components/ui/spinner';
import { getProducts } from '@/editor/hooks/use-shopify-products';
import { Button } from '@/editor/components/ui/button';
import { Spinner } from '@/editor/components/ui/spinner';
interface ProductImage {
url: string;

View File

@@ -4,9 +4,9 @@ import type { ShopifyProduct } from "@reacteditor/field-shopify";
import {
useProduct,
useProductRecommendations,
} from "~/editor/hooks/use-shopify-products";
} from "@/editor/hooks/use-shopify-products";
import { ProductCard } from "./product-card";
import { Typography } from "~/editor/theme/Typography";
import { Typography } from "@/editor/theme/Typography";
export type RecommendedProductsProps = {
product: ShopifyProduct | null;

View File

@@ -2,8 +2,8 @@
import React from 'react';
// local link - plain anchor
import { useShopifyCart } from '~/editor/hooks/use-shopify-cart';
import config from '~/editor/lib/config.json';
import { useShopifyCart } from '@/editor/hooks/use-shopify-cart';
import config from '@/editor/lib/config.json';
const CartIcon: React.FC = () => {
const { toggleCart, itemCount } = useShopifyCart();