Skip to content

Commit

Permalink
ad
Browse files Browse the repository at this point in the history
  • Loading branch information
0-don committed Feb 17, 2024
1 parent 330b436 commit 5daf598
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/src/utils/helpers/serverComponentsUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { UserRoleName } from "@/gql/graphql";
import { TypedDocumentNode } from "@graphql-typed-document-node/core";
import { DehydratedState, QueryClient, dehydrate } from "@tanstack/react-query";
import { cookies, headers } from "next/headers";
import { ROLES, TOKEN, X_URL } from "../constants";
import { ROLES, TOKEN } from "../constants";
import getQueryClient from "../getQueryClient";
import { getKey } from "./clientUtils";
import { customFetcherServer } from "./serverUtils";

export const X_URL = "x-url";

export const ssrUrl = (): URL =>
new URL(headers().get(X_URL) || process.env.NEXT_PUBLIC_GRAPHQL_ENDPOINT);

Expand Down

0 comments on commit 5daf598

Please sign in to comment.