refactor: rework assets fetching

This commit is contained in:
2024-07-25 10:02:15 +02:00
parent cb3d2a3974
commit dc155f58b2
15 changed files with 239 additions and 281 deletions

View File

@@ -6,39 +6,3 @@ export type Prettify<T> = NonNullable<{ [K in keyof T]: T[K] }>;
export type InnerKittyProps<T extends (...args: any[]) => any> = Prettify<
Parameters<T>[0] & KittyContextProps
>;
export type RootManifest = {
files: Array<string>;
projects: Array<{
name: string;
icon: string;
}>;
links: Array<{
name: string;
url: string;
icon: string;
}>;
};
export type Icon = {
char: string;
color: string;
};
export type File = {
name: string;
} & (
| {
type: "link";
url: string;
icon: string;
}
| { type: "file"; repo: string; fileName: string; icon?: string }
);
export type Directory = {
name: string;
type: "directory";
files: Array<File>;
opened: boolean;
};