first commit
Some checks failed
Build / run (push) Has been cancelled

This commit is contained in:
maher
2025-10-29 11:42:25 +01:00
commit 703f50a09d
4595 changed files with 385164 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
import {NavLink} from 'react-router-dom';
import {AppearanceButton} from './appearance-button';
import {useAppearanceStore} from './appearance-store';
import {Trans} from '../../i18n/trans';
import {Fragment, useMemo} from 'react';
export function SectionList() {
const sections = useAppearanceStore(s => s.config?.sections);
const sortedSection = useMemo(() => {
if (!sections) return [];
return Object.entries(sections || [])
.map(([key, value]) => {
return {
...value,
key,
};
})
.sort((a, b) => (a?.position || 1) - (b?.position || 1));
}, [sections]);
return (
<Fragment>
{sortedSection.map(section => {
return (
<AppearanceButton
key={section.key}
to={section.key}
elementType={NavLink}
>
<Trans {...section.label} />
</AppearanceButton>
);
})}
</Fragment>
);
}