Refine cmdk page names
This commit is contained in:
parent
304e6ba858
commit
e18fe3e193
@ -22,7 +22,6 @@ import {
|
||||
PATH_ADMIN_UPLOADS,
|
||||
PATH_FEED_INFERRED,
|
||||
PATH_GRID_INFERRED,
|
||||
PATH_ROOT,
|
||||
PATH_SIGN_IN,
|
||||
pathForCamera,
|
||||
pathForFilm,
|
||||
@ -419,27 +418,24 @@ export default function CommandKClient({
|
||||
});
|
||||
}
|
||||
|
||||
const pagesItems: CommandKItem[] = [{
|
||||
label: 'Home',
|
||||
path: PATH_ROOT,
|
||||
}];
|
||||
const pageFeed: CommandKItem = {
|
||||
label: GRID_HOMEPAGE_ENABLED ? 'Feed' : 'Feed (Home)',
|
||||
path: PATH_FEED_INFERRED,
|
||||
};
|
||||
|
||||
if (GRID_HOMEPAGE_ENABLED) {
|
||||
pagesItems.push({
|
||||
label: 'Feed',
|
||||
path: PATH_FEED_INFERRED,
|
||||
});
|
||||
} else {
|
||||
pagesItems.push({
|
||||
label: 'Grid',
|
||||
path: PATH_GRID_INFERRED,
|
||||
});
|
||||
}
|
||||
const pageGrid: CommandKItem = {
|
||||
label: GRID_HOMEPAGE_ENABLED ? 'Grid (Home)' : 'Grid',
|
||||
path: PATH_GRID_INFERRED,
|
||||
};
|
||||
|
||||
const pageItems: CommandKItem[] = GRID_HOMEPAGE_ENABLED
|
||||
? [pageGrid, pageFeed]
|
||||
: [pageFeed, pageGrid];
|
||||
|
||||
const sectionPages: CommandKSection = {
|
||||
heading: 'Pages',
|
||||
accessory: <HiDocumentText size={15} className="translate-x-[-1px]" />,
|
||||
items: pagesItems,
|
||||
items: pageItems,
|
||||
};
|
||||
|
||||
const adminSection: CommandKSection = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user