Update all imports to use @ relative
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 }) => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 = () => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ComponentConfig } from "@reacteditor/core";
|
||||
import { Megaphone } from "lucide-react";
|
||||
import { cn } from "~/editor/lib/utils";
|
||||
import { Typography } from "~/editor/theme/Typography";
|
||||
import { cn } from "@/editor/lib/utils";
|
||||
import { Typography } from "@/editor/theme/Typography";
|
||||
|
||||
export type CTAProps = {
|
||||
tagline: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ComponentConfig } from "@reacteditor/core";
|
||||
import { useState } from "react";
|
||||
import { HelpCircle, Plus, Minus } from "lucide-react";
|
||||
import { Typography } from "~/editor/theme/Typography";
|
||||
import { Typography } from "@/editor/theme/Typography";
|
||||
|
||||
export type FAQProps = {
|
||||
tagline: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ComponentConfig } from "@reacteditor/core";
|
||||
import { Sparkles } from "lucide-react";
|
||||
import { Typography } from "~/editor/theme/Typography";
|
||||
import { Typography } from "@/editor/theme/Typography";
|
||||
|
||||
export type FeaturesProps = {
|
||||
tagline: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ComponentConfig } from "@reacteditor/core";
|
||||
import { useState } from "react";
|
||||
import { LayoutGrid } from "lucide-react";
|
||||
import { Typography } from "~/editor/theme/Typography";
|
||||
import { Typography } from "@/editor/theme/Typography";
|
||||
|
||||
export type FooterProps = {
|
||||
brand: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ComponentConfig } from "@reacteditor/core";
|
||||
import { LayoutTemplate } from "lucide-react";
|
||||
import { cn } from "~/editor/lib/utils";
|
||||
import { Typography } from "~/editor/theme/Typography";
|
||||
import { cn } from "@/editor/lib/utils";
|
||||
import { Typography } from "@/editor/theme/Typography";
|
||||
|
||||
export type HeroProps = {
|
||||
tagline: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ComponentConfig } from "@reacteditor/core";
|
||||
import { Megaphone } from "lucide-react";
|
||||
import { cn } from "~/editor/lib/utils";
|
||||
import { cn } from "@/editor/lib/utils";
|
||||
|
||||
export type BannerProps = {
|
||||
text: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ComponentConfig } from "@reacteditor/core";
|
||||
import { Images } from "lucide-react";
|
||||
import { cn } from "~/editor/lib/utils";
|
||||
import { Typography } from "~/editor/theme/Typography";
|
||||
import { cn } from "@/editor/lib/utils";
|
||||
import { Typography } from "@/editor/theme/Typography";
|
||||
|
||||
export type ImageGalleryProps = {
|
||||
tagline: string;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { ComponentConfig } from "@reacteditor/core";
|
||||
import { useState } from "react";
|
||||
import { Mail } from "lucide-react";
|
||||
import { cn } from "~/editor/lib/utils";
|
||||
import { Typography } from "~/editor/theme/Typography";
|
||||
import { cn } from "@/editor/lib/utils";
|
||||
import { Typography } from "@/editor/theme/Typography";
|
||||
|
||||
export type NewsletterCtaProps = {
|
||||
tagline: string;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { ComponentConfig } from "@reacteditor/core";
|
||||
import { Menu as MenuIcon, ShoppingBag, Search, User, X } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
import { useShopifyCart } from "~/editor/hooks/use-shopify-cart";
|
||||
import { Sheet, SheetContent, SheetHeader, SheetTitle } from "~/editor/components/ui/sheet";
|
||||
import { cn } from "~/editor/lib/utils";
|
||||
import { useShopifyCart } from "@/editor/hooks/use-shopify-cart";
|
||||
import { Sheet, SheetContent, SheetHeader, SheetTitle } from "@/editor/components/ui/sheet";
|
||||
import { cn } from "@/editor/lib/utils";
|
||||
|
||||
export type NavigationProps = {
|
||||
brand: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ComponentConfig } from "@reacteditor/core";
|
||||
import { useState } from "react";
|
||||
import { Quote, ArrowLeft, ArrowRight } from "lucide-react";
|
||||
import { Typography } from "~/editor/theme/Typography";
|
||||
import { Typography } from "@/editor/theme/Typography";
|
||||
|
||||
export type TestimonialsProps = {
|
||||
tagline: string;
|
||||
|
||||
@@ -4,7 +4,7 @@ import * as React from "react";
|
||||
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
||||
import { ChevronDownIcon } from "lucide-react";
|
||||
|
||||
import { cn } from "~/editor/lib/utils";
|
||||
import { cn } from "@/editor/lib/utils";
|
||||
|
||||
function Accordion({
|
||||
...props
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "~/editor/lib/utils"
|
||||
import { cn } from "@/editor/lib/utils"
|
||||
|
||||
type AlertVariant = "default" | "destructive"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import * as React from "react";
|
||||
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
||||
|
||||
import { cn } from "~/editor/lib/utils";
|
||||
import { cn } from "@/editor/lib/utils";
|
||||
|
||||
function Avatar({
|
||||
className,
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as React from "react";
|
||||
import { Slot } from "@radix-ui/react-slot";
|
||||
import { cva, type VariantProps } from "class-variance-authority";
|
||||
|
||||
import { cn } from "~/editor/lib/utils";
|
||||
import { cn } from "@/editor/lib/utils";
|
||||
|
||||
const badgeVariants = cva(
|
||||
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none transition-[color,box-shadow] overflow-hidden",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { cn } from '~/editor/lib/utils';
|
||||
import { cn } from '@/editor/lib/utils';
|
||||
|
||||
function Breadcrumb({ ...props }: React.ComponentProps<'nav'>) {
|
||||
return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />;
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as React from "react";
|
||||
import { Slot } from "@radix-ui/react-slot";
|
||||
import { cva, type VariantProps } from "class-variance-authority";
|
||||
|
||||
import { cn } from "~/editor/lib/utils";
|
||||
import { cn } from "@/editor/lib/utils";
|
||||
|
||||
const buttonVariants = cva(
|
||||
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "~/editor/lib/utils";
|
||||
import { cn } from "@/editor/lib/utils";
|
||||
|
||||
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
|
||||
@@ -6,7 +6,7 @@ import React, {
|
||||
useRef,
|
||||
useEffect,
|
||||
} from 'react';
|
||||
import { cn } from '~/editor/lib/utils';
|
||||
import { cn } from '@/editor/lib/utils';
|
||||
import { Button } from './button';
|
||||
|
||||
interface CarouselContextType {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "~/editor/lib/utils"
|
||||
import { cn } from "@/editor/lib/utils"
|
||||
|
||||
function Empty({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { OTPInput, OTPInputContext } from 'input-otp';
|
||||
import { cn } from '~/editor/lib/utils';
|
||||
import { cn } from '@/editor/lib/utils';
|
||||
|
||||
function InputOTP({
|
||||
className,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "~/editor/lib/utils"
|
||||
import { cn } from "@/editor/lib/utils"
|
||||
|
||||
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
||||
return (
|
||||
|
||||
@@ -5,7 +5,7 @@ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
||||
import { cva } from "class-variance-authority";
|
||||
import { ChevronDownIcon } from "lucide-react";
|
||||
|
||||
import { cn } from "~/editor/lib/utils";
|
||||
import { cn } from "@/editor/lib/utils";
|
||||
|
||||
function NavigationMenu({
|
||||
className,
|
||||
|
||||
@@ -5,8 +5,8 @@ import {
|
||||
MoreHorizontalIcon,
|
||||
} from "lucide-react"
|
||||
|
||||
import { cn } from "~/editor/lib/utils"
|
||||
import { buttonVariants, type Button } from "~/editor/components/ui/button"
|
||||
import { cn } from "@/editor/lib/utils"
|
||||
import { buttonVariants, type Button } from "@/editor/components/ui/button"
|
||||
|
||||
function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
|
||||
return (
|
||||
|
||||
@@ -6,7 +6,7 @@ import React, {
|
||||
useEffect,
|
||||
useCallback,
|
||||
} from 'react';
|
||||
import { cn } from '~/editor/lib/utils';
|
||||
import { cn } from '@/editor/lib/utils';
|
||||
|
||||
interface SelectContextType {
|
||||
open: boolean;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import * as React from "react";
|
||||
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
||||
|
||||
import { cn } from "~/editor/lib/utils";
|
||||
import { cn } from "@/editor/lib/utils";
|
||||
|
||||
function Separator({
|
||||
className,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useState, useCallback, useContext, createContext } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { motion, AnimatePresence } from 'framer-motion';
|
||||
import { cn } from '~/editor/lib/utils';
|
||||
import { cn } from '@/editor/lib/utils';
|
||||
|
||||
interface SheetContextType {
|
||||
open: boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { cn } from "~/editor/lib/utils"
|
||||
import { cn } from "@/editor/lib/utils"
|
||||
|
||||
function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
import Button from '~/editor/components/ui/button';
|
||||
import Button from '@/editor/components/ui/button';
|
||||
|
||||
export function SonnerDemo() {
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { cn } from '~/editor/lib/utils';
|
||||
import { cn } from '@/editor/lib/utils';
|
||||
|
||||
interface SpinnerProps extends React.ComponentProps<'svg'> {
|
||||
size?: 'sm' | 'md' | 'lg' | 'xl';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { cn } from '~/editor/lib/utils';
|
||||
import { cn } from '@/editor/lib/utils';
|
||||
|
||||
interface SwitchProps extends Omit<
|
||||
React.InputHTMLAttributes<HTMLInputElement>,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { cn } from '~/editor/lib/utils';
|
||||
import { cn } from '@/editor/lib/utils';
|
||||
|
||||
function Table({ className, ...props }: React.ComponentProps<'table'>) {
|
||||
return (
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import * as React from "react";
|
||||
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
||||
|
||||
import { cn } from "~/editor/lib/utils";
|
||||
import { cn } from "@/editor/lib/utils";
|
||||
|
||||
function Tabs({
|
||||
className,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "~/editor/lib/utils"
|
||||
import { cn } from "@/editor/lib/utils"
|
||||
|
||||
function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
||||
return (
|
||||
|
||||
@@ -3,27 +3,27 @@ import {
|
||||
createFieldShopifyCollection,
|
||||
} from "@reacteditor/field-shopify";
|
||||
|
||||
import { navigationEditor } from "~/editor/components/navigation/navigation.editor";
|
||||
import { footerEditor } from "~/editor/components/footer/footer.editor";
|
||||
import { navigationEditor } from "@/editor/components/navigation/navigation.editor";
|
||||
import { footerEditor } from "@/editor/components/footer/footer.editor";
|
||||
|
||||
import { heroEditor } from "~/editor/components/hero/hero.editor";
|
||||
import { bannerEditor } from "~/editor/components/landing/banner.editor";
|
||||
import { heroEditor } from "@/editor/components/hero/hero.editor";
|
||||
import { bannerEditor } from "@/editor/components/landing/banner.editor";
|
||||
|
||||
import { createFeaturedProductEditor } from "~/editor/components/commerce/featured-product.editor";
|
||||
import { createProductsGridEditor } from "~/editor/components/commerce/products-grid.editor";
|
||||
import { createProductsCarouselEditor } from "~/editor/components/commerce/products-carousel.editor";
|
||||
import { collectionGridEditor } from "~/editor/components/commerce/collection-grid.editor";
|
||||
import { createCollectionEditor } from "~/editor/components/commerce/collection.editor";
|
||||
import { createProductDetailsEditor } from "~/editor/components/commerce/product-details.editor";
|
||||
import { createRecommendedProductsEditor } from "~/editor/components/commerce/recommended-products.editor";
|
||||
import { createFeaturedProductEditor } from "@/editor/components/commerce/featured-product.editor";
|
||||
import { createProductsGridEditor } from "@/editor/components/commerce/products-grid.editor";
|
||||
import { createProductsCarouselEditor } from "@/editor/components/commerce/products-carousel.editor";
|
||||
import { collectionGridEditor } from "@/editor/components/commerce/collection-grid.editor";
|
||||
import { createCollectionEditor } from "@/editor/components/commerce/collection.editor";
|
||||
import { createProductDetailsEditor } from "@/editor/components/commerce/product-details.editor";
|
||||
import { createRecommendedProductsEditor } from "@/editor/components/commerce/recommended-products.editor";
|
||||
|
||||
import { featuresEditor } from "~/editor/components/features/features.editor";
|
||||
import { testimonialsEditor } from "~/editor/components/testimonials/testimonials.editor";
|
||||
import { imageGalleryEditor } from "~/editor/components/landing/image-gallery.editor";
|
||||
import { newsletterCtaEditor } from "~/editor/components/landing/newsletter-cta.editor";
|
||||
import { logosEditor } from "~/editor/components/logos/logos.editor";
|
||||
import { ctaEditor } from "~/editor/components/cta/cta.editor";
|
||||
import { faqEditor } from "~/editor/components/faq/faq.editor";
|
||||
import { featuresEditor } from "@/editor/components/features/features.editor";
|
||||
import { testimonialsEditor } from "@/editor/components/testimonials/testimonials.editor";
|
||||
import { imageGalleryEditor } from "@/editor/components/landing/image-gallery.editor";
|
||||
import { newsletterCtaEditor } from "@/editor/components/landing/newsletter-cta.editor";
|
||||
import { logosEditor } from "@/editor/components/logos/logos.editor";
|
||||
import { ctaEditor } from "@/editor/components/cta/cta.editor";
|
||||
import { faqEditor } from "@/editor/components/faq/faq.editor";
|
||||
|
||||
import Root from "./root";
|
||||
import type { UserConfig } from "./types";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { DefaultRootProps, RootConfig } from "@reacteditor/core";
|
||||
import { createFieldGoogleFonts } from "@reacteditor/field-google-fonts";
|
||||
import { ThemeProvider, ThemeProps } from "~/editor/theme/ThemeProvider";
|
||||
import { ThemeProvider, ThemeProps } from "@/editor/theme/ThemeProvider";
|
||||
|
||||
export type RootProps = DefaultRootProps &
|
||||
ThemeProps & {
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
import { Config, Data } from "@reacteditor/core";
|
||||
|
||||
import { HeroProps } from "~/editor/components/hero/hero.editor";
|
||||
import { LogosProps } from "~/editor/components/logos/logos.editor";
|
||||
import { FeaturesProps } from "~/editor/components/features/features.editor";
|
||||
import { TestimonialsProps } from "~/editor/components/testimonials/testimonials.editor";
|
||||
import { CTAProps } from "~/editor/components/cta/cta.editor";
|
||||
import { FAQProps } from "~/editor/components/faq/faq.editor";
|
||||
import { NavigationProps } from "~/editor/components/navigation/navigation.editor";
|
||||
import { FooterProps } from "~/editor/components/footer/footer.editor";
|
||||
import { HeroProps } from "@/editor/components/hero/hero.editor";
|
||||
import { LogosProps } from "@/editor/components/logos/logos.editor";
|
||||
import { FeaturesProps } from "@/editor/components/features/features.editor";
|
||||
import { TestimonialsProps } from "@/editor/components/testimonials/testimonials.editor";
|
||||
import { CTAProps } from "@/editor/components/cta/cta.editor";
|
||||
import { FAQProps } from "@/editor/components/faq/faq.editor";
|
||||
import { NavigationProps } from "@/editor/components/navigation/navigation.editor";
|
||||
import { FooterProps } from "@/editor/components/footer/footer.editor";
|
||||
|
||||
import { ProductsGridProps } from "~/editor/components/commerce/products-grid.editor";
|
||||
import { ProductsCarouselProps } from "~/editor/components/commerce/products-carousel.editor";
|
||||
import { CollectionGridProps } from "~/editor/components/commerce/collection-grid.editor";
|
||||
import { CollectionProps } from "~/editor/components/commerce/collection.editor";
|
||||
import { ProductDetailsProps } from "~/editor/components/commerce/product-details.editor";
|
||||
import { RecommendedProductsProps } from "~/editor/components/commerce/recommended-products.editor";
|
||||
import { FeaturedProductProps } from "~/editor/components/commerce/featured-product.editor";
|
||||
import { ProductsGridProps } from "@/editor/components/commerce/products-grid.editor";
|
||||
import { ProductsCarouselProps } from "@/editor/components/commerce/products-carousel.editor";
|
||||
import { CollectionGridProps } from "@/editor/components/commerce/collection-grid.editor";
|
||||
import { CollectionProps } from "@/editor/components/commerce/collection.editor";
|
||||
import { ProductDetailsProps } from "@/editor/components/commerce/product-details.editor";
|
||||
import { RecommendedProductsProps } from "@/editor/components/commerce/recommended-products.editor";
|
||||
import { FeaturedProductProps } from "@/editor/components/commerce/featured-product.editor";
|
||||
|
||||
import { BannerProps } from "~/editor/components/landing/banner.editor";
|
||||
import { NewsletterCtaProps } from "~/editor/components/landing/newsletter-cta.editor";
|
||||
import { ImageGalleryProps } from "~/editor/components/landing/image-gallery.editor";
|
||||
import { BannerProps } from "@/editor/components/landing/banner.editor";
|
||||
import { NewsletterCtaProps } from "@/editor/components/landing/newsletter-cta.editor";
|
||||
import { ImageGalleryProps } from "@/editor/components/landing/image-gallery.editor";
|
||||
|
||||
import { RootProps } from "./root";
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ import {
|
||||
addCartLines,
|
||||
removeCartLines,
|
||||
updateCartLines,
|
||||
} from '~/editor/hooks/use-shopify-cart';
|
||||
import { setShopifyCredentials } from '~/editor/services/shopify/client';
|
||||
} from '@/editor/hooks/use-shopify-cart';
|
||||
import { setShopifyCredentials } from '@/editor/services/shopify/client';
|
||||
|
||||
const CART_ID_KEY = 'cartId';
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
'use client';
|
||||
|
||||
import { useContext } from 'react';
|
||||
import { shopifyFetch, SHOPIFY_STORE_DOMAIN } from '~/editor/services/shopify/client';
|
||||
import { CartContext } from '~/editor/contexts/shopify-context';
|
||||
import { shopifyFetch, SHOPIFY_STORE_DOMAIN } from '@/editor/services/shopify/client';
|
||||
import { CartContext } from '@/editor/contexts/shopify-context';
|
||||
import {
|
||||
CREATE_CART_MUTATION,
|
||||
ADD_CART_LINES_MUTATION,
|
||||
UPDATE_CART_LINES_MUTATION,
|
||||
REMOVE_CART_LINES_MUTATION,
|
||||
GET_CART_QUERY,
|
||||
} from '~/editor/graphql/cart';
|
||||
} from '@/editor/graphql/cart';
|
||||
|
||||
export interface CartLineInput {
|
||||
merchandiseId: string;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
'use client';
|
||||
|
||||
import { useState, useEffect, useCallback } from 'react';
|
||||
import { shopifyFetch } from '~/editor/services/shopify/client';
|
||||
import { shopifyFetch } from '@/editor/services/shopify/client';
|
||||
import {
|
||||
GET_COLLECTIONS_QUERY,
|
||||
GET_COLLECTION_PRODUCTS_QUERY,
|
||||
} from '~/editor/graphql/collections';
|
||||
} from '@/editor/graphql/collections';
|
||||
import type { Product } from './use-shopify-products';
|
||||
|
||||
interface CollectionImage {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
'use client';
|
||||
|
||||
import { useState, useEffect, useCallback } from 'react';
|
||||
import { shopifyFetch } from '~/editor/services/shopify/client';
|
||||
import { shopifyFetch } from '@/editor/services/shopify/client';
|
||||
import {
|
||||
GET_PRODUCTS_QUERY,
|
||||
GET_PRODUCT_QUERY,
|
||||
QUERY_PRODUCT_RECOMMENDATIONS,
|
||||
} from '~/editor/graphql/products';
|
||||
} from '@/editor/graphql/products';
|
||||
|
||||
interface ProductImage {
|
||||
url: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from "react";
|
||||
import { cn } from "~/editor/lib/utils";
|
||||
import { cn } from "@/editor/lib/utils";
|
||||
|
||||
export type TypographyVariant =
|
||||
| "h1"
|
||||
|
||||
Reference in New Issue
Block a user