Move tree implementation out of collections store (#4763)
* refactor: attaching emoji in tree node is unnecessary * refactor: pass depth and hasChildren as separate props * refactor: move tree impl into a separate hook * refactor: separate out as DocumentExplorer for reuse * fix: separate search and node * fix: review comments * fix: tsc
This commit is contained in:
@@ -117,3 +117,20 @@ export enum TeamPreference {
|
||||
}
|
||||
|
||||
export type TeamPreferences = { [key in TeamPreference]?: boolean };
|
||||
|
||||
export enum NavigationNodeType {
|
||||
Collection = "collection",
|
||||
Document = "document",
|
||||
}
|
||||
|
||||
export type NavigationNode = {
|
||||
id: string;
|
||||
title: string;
|
||||
url: string;
|
||||
children: NavigationNode[];
|
||||
isDraft?: boolean;
|
||||
collectionId?: string;
|
||||
type?: NavigationNodeType;
|
||||
parent?: NavigationNode | null;
|
||||
depth?: number;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user