diff --git a/src/components/ResourceBreadcrumb/index.tsx b/src/components/ResourceBreadcrumb/index.tsx
index 83dbc35..7dfa94a 100644
--- a/src/components/ResourceBreadcrumb/index.tsx
+++ b/src/components/ResourceBreadcrumb/index.tsx
@@ -9,8 +9,17 @@ interface IResourceBreadcrumbProps {
relativePath: any
}
+function capitalize(str: string): string {
+ const split = str.split(" ")
+ const reconstruct = []
+ for (const substr of split) {
+ reconstruct.push(`${substr.charAt(0).toUpperCase()}${substr.substring(1)}`)
+ }
+ return reconstruct.join(" ")
+}
+
function Link({ item }: { item: IFileOrFolder }) {
- return {item.title}
+ return {capitalize(item.title)}
}
function flatten([
@@ -30,6 +39,23 @@ export function ResourceBreadcrumb({ relativePath }: IResourceBreadcrumbProps) {
return (
+
+
+
+
+
+
+
+
{breadcrumbItems.map(item => {
if (item.type === "folder") {
return (