feat(admin, admin-ui, medusa-js, medusa-react, medusa): Support Admin Extensions (#4761)
Co-authored-by: Rares Stefan <948623+StephixOne@users.noreply.github.com> Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
co-authored by
Rares Stefan
Oli Juhl
parent
26c78bbc03
commit
f1a05f4725
@@ -19,3 +19,17 @@ export function stringifyNullProperties<T extends object>(input: T): T {
|
||||
|
||||
return convertProperties(input)
|
||||
}
|
||||
|
||||
export function createAdminPath(path: string) {
|
||||
let formattedPath = path
|
||||
|
||||
if (!formattedPath.startsWith("/")) {
|
||||
formattedPath = `/${formattedPath}`
|
||||
}
|
||||
|
||||
if (!formattedPath.startsWith("/admin")) {
|
||||
formattedPath = `/admin${formattedPath}`
|
||||
}
|
||||
|
||||
return formattedPath
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user