class it up
This commit is contained in:
parent
ae38084440
commit
f1b78197c7
|
|
@ -10,6 +10,7 @@ export function Nav({ app, render }: { app: App; render: () => void }) {
|
||||||
|
|
||||||
// Find all tools
|
// Find all tools
|
||||||
const tools = apps.filter(a => a.tool)
|
const tools = apps.filter(a => a.tool)
|
||||||
|
const titlecase = (s: string) => s.split(' ').map(part => part[0]?.toUpperCase() + part.slice(1))
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TabBar>
|
<TabBar>
|
||||||
|
|
@ -24,7 +25,7 @@ export function Nav({ app, render }: { app: App; render: () => void }) {
|
||||||
active={selectedTab === tool.name ? true : undefined}
|
active={selectedTab === tool.name ? true : undefined}
|
||||||
onClick={() => handleTabClick(tool.name)}
|
onClick={() => handleTabClick(tool.name)}
|
||||||
>
|
>
|
||||||
{toolName}
|
{titlecase(toolName)}
|
||||||
</Tab>
|
</Tab>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user