Skip to content

Commit

Permalink
Remove vercelStegaCleanAll and clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Cristina de Carvalho committed Nov 19, 2023
1 parent 4047418 commit fa35b16
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions templates/hydrogen-theme/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { Fonts } from "./components/Fonts";
import { CMS_SETTINGS_QUERY } from "./qroq/queries";
import { generateFontsPreloadLinks } from "./lib/fonts";
import { useLocale } from "./hooks/useLocale";
import { vercelStegaCleanAll } from "@sanity/client/stega";

// This is important to avoid re-fetching root queries on sub-navigations
export const shouldRevalidate: ShouldRevalidateFunction = ({
Expand Down Expand Up @@ -100,9 +99,7 @@ export async function loader({ context }: LoaderFunctionArgs) {
locale,
sanityPreviewMode,
cms: {
initial: sanityPreviewMode
? cmsSettings
: vercelStegaCleanAll(cmsSettings),
initial: cmsSettings,
query: CMS_SETTINGS_QUERY.query,
params: {},
},
Expand Down
1 change: 0 additions & 1 deletion templates/hydrogen-theme/app/routes/($locale).$.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import type { I18nLocale } from "~/lib/type";
import { CmsSection } from "~/components/CmsSection";
import { PAGE_QUERY } from "~/qroq/queries";
import { useSanityQuery } from "~/hooks/useSanityQuery";
import { useSanityPreviewMode } from "~/hooks/useSanityPreviewMode";

export async function loader({ context, params, request }: LoaderFunctionArgs) {
const { sanity, locale } = context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from "@shopify/hydrogen";
import { json } from "@shopify/remix-oxygen";
import invariant from "tiny-invariant";

import { ProductCardGrid } from "~/components/ProductCardGrid";
import { COLLECTION_QUERY } from "~/graphql/queries";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { LoaderFunctionArgs } from "@shopify/remix-oxygen";
import { json } from "@shopify/remix-oxygen";
import { Link, useLoaderData } from "@remix-run/react";

import type { CollectionsQuery } from "storefrontapi.generated";
import {
flattenConnection,
getPaginationVariables,
Image,
} from "@shopify/hydrogen";

import type { CollectionsQuery } from "storefrontapi.generated";
import { COLLECTIONS_QUERY } from "~/graphql/queries";

const PAGINATION_SIZE = 4;
Expand Down

0 comments on commit fa35b16

Please sign in to comment.