mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 17:25:59 +02:00
refact: extract duplicated File/Folder types
This commit is contained in:
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
export interface IFile {
|
||||
title: string
|
||||
type: "file"
|
||||
path: string
|
||||
}
|
||||
|
||||
export interface IFolder {
|
||||
title: string
|
||||
type: "folder"
|
||||
path: string
|
||||
children: IFileOrFolder[]
|
||||
}
|
||||
|
||||
export type IFileOrFolder = IFile | IFolder
|
||||
|
||||
export interface IFileQuery {
|
||||
node: {
|
||||
relativePath: string
|
||||
childMarkdownRemark: {
|
||||
frontmatter: {
|
||||
author: string
|
||||
date: string
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface IAllResourcesQuery {
|
||||
allFile: {
|
||||
edges: IFileQuery[]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user