This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use client" | |
import imgixLoader from "@/lib/imageLoader" | |
import { | |
ChevronRightIcon, | |
ExclamationTriangleIcon | |
} from "@heroicons/react/24/outline" | |
import { ChevronLeftIcon } from "@heroicons/react/24/solid" | |
import { AnimatePresence, motion, MotionConfig } from "framer-motion" | |
import NextImage from "next/image" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
BaseEnum, | |
EnumRef, | |
InputObjectRef, | |
InputType, | |
InputTypeParam, | |
SchemaTypes | |
} from "@pothos/core" | |
import { getModel, PrismaModelTypes } from "@pothos/plugin-prisma" | |
import Prisma from "@wk/prisma2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react" | |
import { SkeletonPicture } from "./SkeletonPicture" | |
import { AnimatePresence, motion } from "framer-motion" | |
import { AbsoluteSpinner } from "@wk/shared-ui" | |
import { default as NextImage, ImageProps } from "next/image" | |
import { myNextImgLoader } from "../pageComponents/vehicle/SwipeImages" | |
import { VehicleFragmentFragment } from "../../generated/graphql" | |
import { Unarray } from "../../interfaces/vehicles" | |
type IPictureWithSpinner = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generator client { | |
provider = "prisma-client-js" | |
} | |
generator nexusPrisma { | |
provider = "nexus-prisma" | |
} | |
datasource db { | |
provider = "postgresql" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum onDelete { | |
CASCADE | |
SET_NULL | |
} | |
type defaultArray { | |
id: ID! @id | |
value: [String] @scalarList(strategy: RELATION) | |
createdAt: DateTime! @createdAt | |
updatedAt: DateTime! @updatedAt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generator client { | |
provider = "prisma-client-js" | |
} | |
generator nexusPrisma { | |
provider = "nexus-prisma" | |
} | |
datasource db { | |
provider = "postgresql" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generator client { | |
provider = "prisma-client-js" | |
} | |
generator nexusPrisma { | |
provider = "nexus-prisma" | |
} | |
datasource db { | |
provider = "postgresql" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useMemo } from "react" | |
import { ApolloClient, InMemoryCache, from } from "@apollo/client" | |
import { setContext } from "@apollo/client/link/context" | |
import { createUploadLink } from "apollo-upload-client" | |
import { onError } from "@apollo/client/link/error" | |
let apolloClient | |
const uri = ({ operationName }) => { | |
if (operationName.includes(`Sanity`)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { renderToString, renderToStaticMarkup } from 'react-dom/server' | |
import ApolloClient, { createNetworkInterface, } from 'apollo-client' | |
import { ApolloProvider, getDataFromTree } from 'react-apollo' | |
// Apollo Setup | |
const networkInterface = createNetworkInterface({ | |
uri: process.env.GRAPHCOOL_API | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { renderToString } from "react-dom/server"; | |
import ApolloClient, { createNetworkInterface } from "apollo-client"; | |
import { ApolloProvider, getDataFromTree } from "react-apollo"; | |
import { ServerStyleSheet, StyleSheetManager } from "styled-components"; | |
// function to generate hydrated state for client side Apollo | |
function makeApolloState(ssrClient) { | |
const state = { apollo: ssrClient.getInitialState() } | |
// appends apollo state to the global client window object |
NewerOlder