Skip to content

Commit

Permalink
Don't use @h2 imports
Browse files Browse the repository at this point in the history
  • Loading branch information
gbalint committed May 16, 2024
1 parent 781f6e0 commit 4d4ec8a
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 21 deletions.
10 changes: 5 additions & 5 deletions app/components/hydrogen/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import {Disclosure} from '@headlessui/react';
import {Suspense} from 'react';

import {Text, Heading} from '@h2/Text';
import {Text, Heading} from '/app/components/hydrogen/Text';
import {Section} from './Section';
import {CountrySelector} from '@h2/CountrySelector';
import {IconCaret} from '@h2/Icon';
import {CountrySelector} from '/app/components/hydrogen/CountrySelector';
import {IconCaret} from '/app/components/hydrogen/Icon';
import {useIsHomePath} from '~/lib/utils';

import {CountrySelector} from '@h2/CountrySelector';
import {CountrySelector} from '/app/components/hydrogen/CountrySelector';

import Link from '@h2/Link';
import Link from '/app/components/hydrogen/Link';

export function Footer({menu}) {
const isHome = useIsHomePath();
Expand Down
8 changes: 4 additions & 4 deletions app/components/hydrogen/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import useWindowScroll from 'react-use/esm/useWindowScroll';
import {Suspense, useEffect, useMemo} from 'react';
import {CartForm} from '@shopify/hydrogen';

import {Text, Heading} from '@h2/Text';
import {Text, Heading} from '/app/components/hydrogen/Text';

import {Cart} from '@h2/Cart';
import {CartLoading} from '@h2/CartLoading';
import {Cart} from '/app/components/hydrogen/Cart';
import {CartLoading} from '/app/components/hydrogen/CartLoading';
import {Input} from '~/components/Input';
import {Drawer, useDrawer} from '~/components/Drawer';
import {
Expand All @@ -21,7 +21,7 @@ import {useIsHydrated} from '~/hooks/useIsHydrated';
import {useCartFetchers} from '~/hooks/useCartFetchers';
import {useRootLoaderData} from '~/root';

import Link from '@h2/Link';
import Link from '/app/components/hydrogen/Link';

export default function Header({title, menu}) {
const isHome = useIsHomePath();
Expand Down
6 changes: 3 additions & 3 deletions app/components/hydrogen/ProductCard.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import clsx from 'clsx';
import {flattenConnection, Image, Money} from '@shopify/hydrogen';

import {Text} from '@h2/Text';
import {Link} from '@h2/Link';
import {Button, AddToCartButton} from '@h2/Button';
import {Text} from '/app/components/hydrogen/Text';
import {Link} from '/app/components/hydrogen/Link';
import {Button, AddToCartButton} from '/app/components/hydrogen/Button';
import {isDiscounted, isNewArrival} from '~/lib/utils';

export function ProductCard({
Expand Down
4 changes: 2 additions & 2 deletions app/components/hydrogen/ProductSwimlane.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Section} from '@h2/new/Layout';
import {ProductCard} from '@h2/ProductCard';
import {Section} from '/app/components/hydrogen/new/Layout';
import {ProductCard} from '/app/components/hydrogen/ProductCard';

const mockProducts = {
nodes: new Array(12).fill(''),
Expand Down
8 changes: 7 additions & 1 deletion app/routes/products.$handle/sections/highlight-details.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import {Container, Section, Background, Grid, Flex} from '@h2/new/Layout';
import {
Container,
Section,
Background,
Grid,
Flex,
} from '/app/components/hydrogen/new/Layout';
import {Heading} from '~/components/hydrogen/Text';

export default function HighlightDetails() {
Expand Down
10 changes: 8 additions & 2 deletions app/routes/products.$handle/sections/highlight-solution.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import {Heading, Text} from '@h2/Text';
import {Heading, Text} from '/app/components/hydrogen/Text';
import {useLoaderData} from '@remix-run/react';
import {Button} from '~/components/hydrogen/Button';
import {Image} from '@shopify/hydrogen';
import {Flex, Section, Container, Background, Grid} from '@h2/new/Layout';
import {
Flex,
Section,
Container,
Background,
Grid,
} from '/app/components/hydrogen/new/Layout';

export default function HighlightSolution() {
const {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/products.$handle/sections/marquee.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Marquee from '@h2/Marquee';
import Marquee from '/app/components/hydrogen/Marquee';

export default function Banner() {
const slogan = Array(10)
Expand Down
6 changes: 3 additions & 3 deletions app/routes/products.$handle/sections/reviews.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Container} from '@h2/new/Layout';
import {Heading, Text} from '@h2/Text';
import {Button} from '@h2/Button';
import {Container} from '/app/components/hydrogen/new/Layout';
import {Heading, Text} from '/app/components/hydrogen/Text';
import {Button} from '/app/components/hydrogen/Button';

export default function Reviews() {
return (
Expand Down
30 changes: 30 additions & 0 deletions vite.config.js.timestamp-1715768218457-5698a35ced6ea.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// vite.config.js
import { defineConfig } from "file:///Users/gbalint/dev/hydrogen-may/node_modules/vite/dist/node/index.js";
import { hydrogen } from "file:///Users/gbalint/dev/hydrogen-may/node_modules/@shopify/hydrogen/dist/vite/plugin.js";
import { oxygen } from "file:///Users/gbalint/dev/hydrogen-may/node_modules/@shopify/mini-oxygen/dist/vite/plugin.js";
import { vitePlugin as remix } from "file:///Users/gbalint/dev/hydrogen-may/node_modules/@remix-run/dev/dist/index.js";
import tsconfigPaths from "file:///Users/gbalint/dev/hydrogen-may/node_modules/vite-tsconfig-paths/dist/index.mjs";
var vite_config_default = defineConfig({
plugins: [
hydrogen(),
oxygen(),
remix({
presets: [hydrogen.preset()],
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true
}
}),
tsconfigPaths()
],
build: {
// Allow a strict Content-Security-Policy
// withtout inlining assets as base64:
assetsInlineLimit: 0
}
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvZ2JhbGludC9kZXYvaHlkcm9nZW4tbWF5XCI7Y29uc3QgX192aX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