Page MenuHomeWickedGov Phorge

providerActions.js
No OneTemporary

Size
695 B
Referenced Files
None
Subscribers
None

providerActions.js

const { CommandPaletteItem, CommandPaletteNavigateAction, CommandPaletteNoneAction } = require( '../types.js' );
/**
* Returns a navigation action result based on the item's URL.
*
* This is primarily used for keyboard-driven selections (e.g., Enter key),
* as clicks on items with URLs are handled by standard browser behavior on `<a>` tags.
*
* @param {CommandPaletteItem} item The selected item.
* @return {CommandPaletteNavigateAction | CommandPaletteNoneAction} Action result for the UI.
*/
function getNavigationAction( item ) {
if ( !item?.url ) {
return { action: 'none' };
}
return { action: 'navigate', payload: item.url };
}
module.exports = {
getNavigationAction
};

File Metadata

Mime Type
text/plain
Expires
Wed, Aug 19, 06:24 (1 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
e6/01/8b0cc7756d7c0e528ed1539720cc
Default Alt Text
providerActions.js (695 B)

Event Timeline