mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
Allow tab name 0
This commit is contained in:
parent
898fb88d86
commit
e663994c9b
@ -4,7 +4,7 @@ import classNames from "classnames";
|
||||
import { TabContext } from "utils/contexts/tab";
|
||||
|
||||
export function slugify(tabName) {
|
||||
return tabName ? encodeURIComponent(tabName.toString().replace(/\s+/g, '-').toLowerCase()) : ''
|
||||
return tabName !== undefined ? encodeURIComponent(tabName.toString().replace(/\s+/g, '-').toLowerCase()) : ''
|
||||
}
|
||||
|
||||
export default function Tab({ tab }) {
|
||||
|
@ -239,7 +239,7 @@ function Home({ initialSettings }) {
|
||||
const tabs = useMemo( () => [
|
||||
...new Set(
|
||||
Object.keys(settings.layout ?? {}).map(
|
||||
(groupName) => settings.layout[groupName]?.tab
|
||||
(groupName) => settings.layout[groupName]?.tab?.toString()
|
||||
).filter(group => group)
|
||||
)
|
||||
], [settings.layout]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user