mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-10-23 17:19:30 +02:00
54 lines
911 B
JavaScript
54 lines
911 B
JavaScript
|
// @flow
|
||
|
import type { Node as ReactNode } from 'react';
|
||
|
|
||
|
export type RenderCallback = (data: any) => ReactNode;
|
||
|
|
||
|
export type Entry = (string[]) => string;
|
||
|
|
||
|
export type WidgetFor = (string) => string;
|
||
|
|
||
|
export type PageContext = {
|
||
|
tag: string,
|
||
|
category: string,
|
||
|
currentPage: number,
|
||
|
prevPagePath: string,
|
||
|
nextPagePath: string,
|
||
|
hasPrevPage: boolean,
|
||
|
hasNextPage: boolean
|
||
|
};
|
||
|
|
||
|
export type Node = {
|
||
|
fields: {
|
||
|
slug: string,
|
||
|
categorySlug?: string,
|
||
|
tagSlugs?: string[]
|
||
|
},
|
||
|
frontmatter: {
|
||
|
date: string,
|
||
|
description?: string,
|
||
|
category?: string,
|
||
|
tags?: string[],
|
||
|
title: string,
|
||
|
},
|
||
|
html: string,
|
||
|
id: string
|
||
|
};
|
||
|
|
||
|
export type Edge = {
|
||
|
node: Node
|
||
|
};
|
||
|
|
||
|
export type Edges = Array<Edge>;
|
||
|
|
||
|
export type AllMarkdownRemark = {
|
||
|
allMarkdownRemark: {
|
||
|
edges: Edges,
|
||
|
},
|
||
|
group: {
|
||
|
fieldValue: string,
|
||
|
totalCount: number
|
||
|
}[]
|
||
|
};
|
||
|
|
||
|
export type MarkdownRemark = Node;
|