fix: fixed shortcuts population (#7016)
This PR fixes #6776 Screenshots: <img width="1728" alt="image" src="https://github.com/user-attachments/assets/ca061c30-ddb7-40ff-8c54-8b0d85d40864"> --------- Co-authored-by: sid0-0 <a@b.com> Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -0,0 +1,18 @@
|
||||
import { GoToHotkeyItemEffect } from '@/app/effect-components/GoToHotkeyItemEffect';
|
||||
import { useNonSystemActiveObjectMetadataItems } from '@/object-metadata/hooks/useNonSystemActiveObjectMetadataItems';
|
||||
import { useGoToHotkeys } from '@/ui/utilities/hotkey/hooks/useGoToHotkeys';
|
||||
|
||||
export const GotoHotkeys = () => {
|
||||
const { nonSystemActiveObjectMetadataItems } =
|
||||
useNonSystemActiveObjectMetadataItems();
|
||||
|
||||
// Hardcoded since settings is static
|
||||
useGoToHotkeys('s', '/settings/profile');
|
||||
|
||||
return nonSystemActiveObjectMetadataItems.map((objectMetadataItem) => (
|
||||
<GoToHotkeyItemEffect
|
||||
hotkey={objectMetadataItem.namePlural[0]}
|
||||
pathToNavigateTo={`/objects/${objectMetadataItem.namePlural}`}
|
||||
/>
|
||||
));
|
||||
};
|
||||
Reference in New Issue
Block a user