@bizniche/react
Advanced tools
Comparing version 0.3.4 to 0.3.5
@@ -13,4 +13,9 @@ import { QueryHookOptions } from '@apollo/client'; | ||
error: import("@apollo/client").ApolloError | undefined; | ||
refetch: (variables?: Partial<import("@apollo/client").OperationVariables> | undefined) => Promise<import("@apollo/client").ApolloQueryResult<any>>; | ||
fetchMore: <TFetchData = any, TFetchVars extends import("@apollo/client").OperationVariables = import("@apollo/client").OperationVariables>(fetchMoreOptions: import("@apollo/client").FetchMoreQueryOptions<TFetchVars, TFetchData> & { | ||
updateQuery?: ((previousQueryResult: any, options: { | ||
fetchMoreResult: TFetchData; | ||
variables: TFetchVars; | ||
}) => any) | undefined; | ||
}) => Promise<import("@apollo/client").ApolloQueryResult<TFetchData>>; | ||
}; | ||
export {}; |
import { PropsWithChildren } from 'react'; | ||
interface BiznicheProviderProps extends PropsWithChildren { | ||
apiKey: string; | ||
config?: any; | ||
} | ||
export declare const BiznicheProvider: ({ apiKey, children, }: BiznicheProviderProps) => import("react/jsx-runtime").JSX.Element; | ||
export {}; |
import { jsx as c } from "react/jsx-runtime"; | ||
import { HttpLink as s, ApolloClient as p, InMemoryCache as d, ApolloProvider as a, gql as i, useQuery as u } from "@apollo/client"; | ||
import { HttpLink as s, ApolloClient as p, InMemoryCache as d, ApolloProvider as a, gql as i, useQuery as o } from "@apollo/client"; | ||
const l = "https://api.bizniche.co/graphql"; | ||
@@ -15,3 +15,3 @@ function y({ | ||
link: e, | ||
cache: new d({}) | ||
cache: new d() | ||
}); | ||
@@ -41,3 +41,3 @@ } | ||
function P(t) { | ||
const { data: e, loading: r, error: n, refetch: o } = u( | ||
const { data: e, loading: r, error: n, fetchMore: u } = o( | ||
Q, | ||
@@ -50,3 +50,3 @@ t | ||
error: n, | ||
refetch: o | ||
fetchMore: u | ||
}; | ||
@@ -73,3 +73,3 @@ } | ||
function f(t) { | ||
const { data: e, loading: r, error: n } = u(g, t); | ||
const { data: e, loading: r, error: n } = o(g, t); | ||
return { | ||
@@ -76,0 +76,0 @@ post: e == null ? void 0 : e.getPostQuery, |
@@ -0,1 +1,11 @@ | ||
export interface Block { | ||
id?: string; | ||
type: string; | ||
data: Record<string, any>; | ||
} | ||
export type DataProp = { | ||
time: number; | ||
version: string; | ||
blocks: Block[]; | ||
}; | ||
export type Author = { | ||
@@ -12,3 +22,3 @@ id: string; | ||
slug: string; | ||
content: string; | ||
content: DataProp; | ||
description: string; | ||
@@ -15,0 +25,0 @@ created_at?: Date; |
{ | ||
"name": "@bizniche/react", | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"author": "Matt Gordon <matt@lemonade.tech>", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
5386
155