feat: add personal project list, add project settings, etc

This commit is contained in:
2024-02-24 03:55:50 +00:00
parent 49b80a2f4c
commit 751210c819
31 changed files with 877 additions and 148 deletions
+4 -2
View File
@@ -20,12 +20,14 @@ export function getUrl(...path: string[]) {
export function getPreviewUrl(
project: Pick<ProjectSchema, "slug">,
file: string | Pick<FileSchema, "path">
file: string | Pick<FileSchema, "path">,
opt?: Partial<{ raw: boolean }>
) {
return getUrl(
const url = getUrl(
`api/preview/${project.slug}`,
typeof file === "string" ? file : file.path
);
return opt?.raw ? url + "?raw=true" : url;
}
export const ucfirst = (str: string) => {