Merge remote-tracking branch 'origin' into feature/tracking
This commit is contained in:
@@ -5,6 +5,7 @@ import "dayjs/locale/sv"
|
||||
|
||||
import d from "dayjs"
|
||||
import advancedFormat from "dayjs/plugin/advancedFormat"
|
||||
import duration from "dayjs/plugin/duration"
|
||||
import isSameOrAfter from "dayjs/plugin/isSameOrAfter"
|
||||
import isToday from "dayjs/plugin/isToday"
|
||||
import relativeTime from "dayjs/plugin/relativeTime"
|
||||
@@ -64,5 +65,6 @@ d.extend(relativeTime)
|
||||
d.extend(timezone)
|
||||
d.extend(utc)
|
||||
d.extend(isSameOrAfter)
|
||||
d.extend(duration)
|
||||
|
||||
export const dt = d
|
||||
|
||||
16
lib/graphql/Query/RewardsWithRedeem.graphql
Normal file
16
lib/graphql/Query/RewardsWithRedeem.graphql
Normal file
@@ -0,0 +1,16 @@
|
||||
query GetRewards($locale: String!, $rewardIds: [String!]) {
|
||||
all_reward(locale: $locale, where: { reward_id_in: $rewardIds }) {
|
||||
items {
|
||||
taxonomies {
|
||||
term_uid
|
||||
}
|
||||
label
|
||||
grouped_label
|
||||
description
|
||||
redeem_description
|
||||
grouped_description
|
||||
value
|
||||
reward_id
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import "server-only"
|
||||
|
||||
import { ClientError, GraphQLClient } from "graphql-request"
|
||||
import { ClientError, type GraphQLClient } from "graphql-request"
|
||||
|
||||
import { Lang } from "@/constants/languages"
|
||||
import { env } from "@/env/server"
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { DocumentNode } from "graphql"
|
||||
import { GraphQLClient } from "graphql-request"
|
||||
|
||||
import { env } from "@/env/server"
|
||||
|
||||
import { request as _request } from "./_request"
|
||||
|
||||
import { Data } from "@/types/request"
|
||||
import type { DocumentNode } from "graphql"
|
||||
|
||||
import type { Data } from "@/types/request"
|
||||
|
||||
export async function edgeRequest<T>(
|
||||
query: string | DocumentNode,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import fetchRetry from "fetch-retry"
|
||||
import { DocumentNode } from "graphql"
|
||||
import { GraphQLClient } from "graphql-request"
|
||||
import { cache } from "react"
|
||||
|
||||
@@ -8,7 +7,9 @@ import { getPreviewHash, isPreviewByUid } from "@/lib/previewContext"
|
||||
|
||||
import { request as _request } from "./_request"
|
||||
|
||||
import { Data } from "@/types/request"
|
||||
import type { DocumentNode } from "graphql"
|
||||
|
||||
import type { Data } from "@/types/request"
|
||||
|
||||
export async function request<T>(
|
||||
query: string | DocumentNode,
|
||||
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
QueryClientProvider,
|
||||
} from "@tanstack/react-query"
|
||||
import { httpBatchLink, loggerLink, TRPCClientError } from "@trpc/client"
|
||||
import { AnyTRPCRouter } from "@trpc/server"
|
||||
import { useState } from "react"
|
||||
|
||||
import { login } from "@/constants/routes/handleAuth"
|
||||
@@ -18,6 +17,8 @@ import useLang from "@/hooks/useLang"
|
||||
|
||||
import { trpc } from "./client"
|
||||
|
||||
import type { AnyTRPCRouter } from "@trpc/server"
|
||||
|
||||
function initializeTrpcClient() {
|
||||
// Locally we set nextjs to run on port to 3000 so that we always guarantee
|
||||
// that trpc and next are running on the same port.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { createTRPCReact } from "@trpc/react-query"
|
||||
import { inferRouterInputs, inferRouterOutputs } from "@trpc/server"
|
||||
|
||||
import type { inferRouterInputs, inferRouterOutputs } from "@trpc/server"
|
||||
|
||||
import type { AppRouter } from "@/server"
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { Lang } from "@/constants/languages"
|
||||
|
||||
import { cache } from "@/utils/cache"
|
||||
|
||||
import { serverClient } from "../server"
|
||||
@@ -8,6 +6,7 @@ import type {
|
||||
BreackfastPackagesInput,
|
||||
PackagesInput,
|
||||
} from "@/types/requests/packages"
|
||||
import type { Lang } from "@/constants/languages"
|
||||
import type {
|
||||
GetRoomsAvailabilityInput,
|
||||
GetSelectedRoomAvailabilityInput,
|
||||
|
||||
Reference in New Issue
Block a user