Skip to content

Commit

Permalink
Merge branch 'Weaverse:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-phan authored May 17, 2024
2 parents 0a4c459 + aacfc72 commit d6f74bf
Show file tree
Hide file tree
Showing 5 changed files with 170 additions and 272 deletions.
4 changes: 1 addition & 3 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
module.exports = {
extends: [
"@remix-run/eslint-config",
"plugin:hydrogen/recommended",
"plugin:hydrogen/typescript",
],
rules: {
"@typescript-eslint/ban-ts-comment": "off",
Expand All @@ -17,7 +15,7 @@ module.exports = {
// TODO: Remove jest plugin from hydrogen/eslint-plugin
"jest/no-deprecated-functions": "off",
"import/order": [
"error",
"warn",
{
/**
* @description
Expand Down
3 changes: 2 additions & 1 deletion app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export default async function handleRequest(
const { nonce, header, NonceProvider } = createContentSecurityPolicy({
...getWeaverseCsp(request),
shop: {
checkoutDomain: context.env?.PUBLIC_CHECKOUT_DOMAIN,
checkoutDomain:
context.env?.PUBLIC_CHECKOUT_DOMAIN || context.env?.PUBLIC_STORE_DOMAIN,
storeDomain: context.env?.PUBLIC_STORE_DOMAIN,
},
});
Expand Down
12 changes: 6 additions & 6 deletions app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {
import { defer } from "@shopify/remix-oxygen";
import type {
MetaArgs,
type AppLoadContext,
defer,
type LinksFunction,
type LoaderFunctionArgs,
MetaArgs,
type SerializeFrom,
} from "@shopify/remix-oxygen";
import type { ShouldRevalidateFunction } from "@remix-run/react";
Expand All @@ -25,22 +25,22 @@ import {
UNSTABLE_Analytics as Analytics,
useNonce,
} from "@shopify/hydrogen";
import { CustomAnalytics } from "~/components/CustomAnalytics";
import invariant from "tiny-invariant";
import { withWeaverse } from "@weaverse/hydrogen";
import roboto400 from "@fontsource/roboto/400.css?url";
import roboto500 from "@fontsource/roboto/500.css?url";
import roboto700 from "@fontsource/roboto/700.css?url";

import { CustomAnalytics } from "~/components/CustomAnalytics";
import { Layout } from "~/components";
import { seoPayload } from "~/lib/seo.server";
import { GlobalLoading } from "~/components/global-loading";

import { GenericError } from "./components/GenericError";
import { NotFound } from "./components/NotFound";
import styles from "./styles/app.css?url";
import { DEFAULT_LOCALE, parseMenu } from "./lib/utils";
import { GlobalStyle } from "./weaverse/style";
import { GlobalLoading } from "~/components/global-loading";

// This is important to avoid re-fetching root queries on sub-navigations
export const shouldRevalidate: ShouldRevalidateFunction = ({
Expand Down Expand Up @@ -106,7 +106,7 @@ export async function loader({ request, context }: LoaderFunctionArgs) {
publicStorefrontId: env.PUBLIC_STOREFRONT_ID,
}),
consent: {
checkoutDomain: env.PUBLIC_CHECKOUT_DOMAIN,
checkoutDomain: env.PUBLIC_CHECKOUT_DOMAIN || env.PUBLIC_STORE_DOMAIN,
storefrontAccessToken: env.PUBLIC_STOREFRONT_API_TOKEN,
},
isLoggedIn: isLoggedInPromise,
Expand Down
Loading

0 comments on commit d6f74bf

Please sign in to comment.