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 { AnyZodObject, z } from 'zod' | |
import { Metadata, ResolvingMetadata } from 'next' | |
type InferParams<Params> = Params extends readonly string[] | |
? { | |
[K in Params[number]]: string | |
} | |
: Params extends AnyZodObject | |
? z.infer<Params> | |
: unknown |
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 ReactDOMServer from 'react-dom/server' | |
import Image from 'next/image' | |
import Parse, { | |
HTMLReactParserOptions, | |
DOMNode, | |
Element, | |
} from 'html-react-parser' | |
const isElement = (domNode: DOMNode): domNode is Element => { |
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 { GetServerSideProps } from 'next' | |
import { | |
providers, | |
getSession, | |
csrfToken, | |
ClientSafeProvider, | |
} from 'next-auth/client' | |
import { getSdk } from '@schema/graphql' | |
import cmsClient from '@healthwave/utils/cms/graphqlClient' |
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 type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next' | |
import jwt from 'jsonwebtoken'; | |
import {v4 as uuidv4} from 'uuid'; | |
import concatHeader from '../utils/concat-cookie' | |
import getConfig from '../utils/get-config' | |
function getSsoLoginUrl(customerId: number, storeHash: string, storeUrl: string, clientId: string, clientSecret: string) { | |
const dateCreated = Math.round((new Date()). getTime() / 1000); | |
const payload = { | |
"iss": clientId, |
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
const playerMachine = { | |
id: "player", | |
initial: "waiting", | |
states: { | |
waiting: { | |
on: { | |
PLAY: "playing", | |
}, | |
}, |
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
const waiting = { | |
on: { | |
BET: "playing", | |
RAISE: "betting", | |
}, | |
} | |
const playing = { | |
on: { | |
FOLD: "folded", | |
CHECK: "waiting", |
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
const https = require('https') | |
const { parse } = require('url') | |
const next = require('next') | |
const fs = require('fs') | |
const dev = process.env.NODE_ENV !== 'production' | |
const app = next({ dev }) | |
const handle = app.getRequestHandler() | |
const options = { |
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
export default (type = 'transition') => { | |
let types = | |
type === 'transition' | |
? { | |
OTransition: 'oTransitionEnd', | |
WebkitTransition: 'webkitTransitionEnd', | |
MozTransition: 'transitionend', | |
transition: 'transitionend' | |
} | |
: { |
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
/* global */ | |
const webpack = require('webpack') | |
const path = require('path') | |
const ProgressBarPlugin = require('progress-bar-webpack-plugin') | |
const querystring = require('querystring') | |
const { removeEmpty } = require('webpack-config-utils') | |
const UglifyJsPlugin = require('uglifyjs-webpack-plugin') | |
let BundleAnalyzerPlugin = require('webpack-bundle-analyzer') | |
.BundleAnalyzerPlugin |
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
const fractal = require('@frctl/fractal').create() | |
const paths = { | |
build: PATH_CONFIG.build, | |
src: PATH_CONFIG.src, | |
static: PATH_CONFIG.static, | |
} | |
const stamp = global.production ? `.${TASK_CONFIG.stamp}` : '' | |
const mandelbrot = require('@frctl/mandelbrot')({ |
NewerOlder