This file contains hidden or 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
/* tslint:disable */ | |
/** | |
* This file was automatically generated by json-schema-to-typescript. | |
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, | |
* and run json-schema-to-typescript to regenerate this file. | |
*/ | |
export type Schema = | |
| { | |
success?: boolean; |
This file contains hidden or 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
//methods | |
import { BaseSchemaThingie, RawPaddleEvent } from "app/core/paddle/types"; | |
import { filterWebookEvents } from "app/core/paddle/utils/filter-webook-events"; | |
import axios, { AxiosResponse } from "axios"; | |
import { GetPayments } from "./types/getPayments"; | |
import { Schema as GetSubscriptionDetails } from "app/core/paddle/sdk/requests/getSubscriptionDetails/type"; | |
import { GetWebhookEvents, PaddleClientConfig, PaddleRequest } from "./types/types"; |
This file contains hidden or 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 { useDisclosure } from "@chakra-ui/react"; | |
import ConfirmDialog from "app/core/chakra-prompts/ConfirmDialog"; | |
import FormPrompt from "app/core/chakra-prompts/FormPrompt"; | |
import React, { useContext, useState } from "react"; | |
const ChakraPromptsContext = React.createContext<any>(null); | |
export const useChakraPrompts = () => useContext(ChakraPromptsContext); | |
const Manager = ({ children }) => { | |
const [config, setConfig] = useState<any>({}); |
This file contains hidden or 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 { useToast } from "@chakra-ui/react"; | |
import { exists } from "app/core/utils/js-utils"; | |
import { QueryFn, useMutation } from "blitz"; | |
import { MutationOptions } from "react-query"; | |
type ShowLoginOnFailFn = (s: any) => boolean; | |
type CustomOptions = { | |
errorMessage?: string; | |
showLoginOnFail?: boolean | ShowLoginOnFailFn; |
This file contains hidden or 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 Head from 'next/head'; | |
import React from 'react'; | |
import { isDev } from 'utils/is-prod'; | |
const prefix = isDev ? 'http://localhost:3004' : 'https://kitze.io'; | |
const getImage = (url) => `${prefix}/${url}`; | |
const Meta: React.FC<{ | |
title?: string; |
This file contains hidden or 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 flex from '../../styles/flex'; | |
import { absoluteCorner, fixedSize } from 'styled-mixins'; | |
const textColor = `#e0e0e0`; | |
const Bio = ({ styles }) => { | |
return ( | |
<div | |
style={{ |
This file contains hidden or 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 { cloud } from 'app/config/cloudinary'; | |
import { GetCloudinarySignatureSchema } from 'app/data/images/schema'; | |
import { protect } from 'app/utils/auth-utils'; | |
import { Role } from 'app/utils/enums'; | |
import { getEnv } from 'app/utils/get-env'; | |
export default protect( | |
{ schema: GetCloudinarySignatureSchema, role: Role.User }, | |
async function getCloudinarySignature({ publicId, folder }) { | |
const timestamp = Math.round(new Date().getTime() / 1000); |
This file contains hidden or 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 { Box as OriginalBox } from "@chakra-ui/core"; | |
import { PseudoBox } from "@chakra-ui/core/dist"; | |
import React from "react"; | |
import styled from "@emotion/styled"; | |
import flex from "styles/flex"; | |
import { fixedHeight, fixedWidth } from "styled-mixins"; | |
import { gridProps, grid } from "styled-mixins"; | |
export interface CommonProps { | |
wrap?: boolean; |
This file contains hidden or 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 TrainingView = () => { | |
const trainingSlug = useSingleParam(routeParams.TrainingSlug); | |
const result = useTrainingViewQuery({ | |
variables: { | |
slug: trainingSlug | |
} | |
}); | |
return useHandleData(result)(({ me: { trainingSessions } }) => { | |
let [trainingSession] = trainingSessions; |
This file contains hidden or 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 { types, IAnyModelType, Instance, cast } from "mobx-state-tree"; | |
import React, { useMemo } from "react"; | |
export const createModel = <T extends IAnyModelType>( | |
model: T, | |
value?: Record<string, any> | |
) => types.optional(model, () => model.create(value)); | |
export function castSelf<IStoreInstance, IParentModel>( | |
store: IStoreInstance, |