Path: blob/main/frontend/constants/menuLinks.ts
3855 views
type SegmentData = {1action?: string,2cta?: string,3location?: string4}56/**7* Represent a navigation link for the menus of the site8*/9interface NavLink {10/** The visible name of the link */11label: string12/** Where we want to go */13url: string14/** Includes an object with the information of the action. Example:15* ```ts16* {17action: 'Qiskit Community: GitHub'18}19```20*/21segment?: SegmentData22/** Only for <a> links. Use `_blank` to open the link in a new tab */23target?: string24/** Only for <a> links. Specifies the relationship between the current document25* and the linked document. Possible values: `nofollow`, `noreferrer`, `noopener`,26* `me` or a combination of them27*/28rel?: string29/** The visible icon of the link */30icon?: 'LogoTwitter20'|'LogoSlack20'|'LogoYouTube20'|'LogoMedium20'31/**32* TODO: This is for enabling a quick fix of a menu hierarchy for addressing:33* https://github.com/Qiskit/qiskit.org/issues/70034*35* If we are going to deal with link hierarchies, it is better to keep36* separated NavLink instances from HierarchyNode instances. For instance37* creating a node made of a root and children or providing a ParentNode38* interface a-la HTML DOM.39*/40sublinks?: NavLink[]41}4243export type { NavLink }444546