mirror of
https://github.com/khairul169/code-share.git
synced 2026-10-24 11:53:58 +07:00
feat: add personal project list, add project settings, etc
This commit is contained in:
+4
-2
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user