File tree Expand file tree Collapse file tree 5 files changed +20
-7
lines changed
Expand file tree Collapse file tree 5 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ export function Navbar() {
4747 href = { route . path }
4848 className = "text-label-md hover:text-names-primary-80 md:whitespace-nowrap"
4949 data-testid = { `${ route . id } -link` }
50+ { ...( 'isExternal' in route ? { target : '_blank' } : { } ) }
5051 >
5152 { route . title }
5253 </ Link >
Original file line number Diff line number Diff line change 33
44import { Discord , SmX } from '@iota/apps-ui-icons' ;
55
6- import { ProtectedRouteTitle } from '../enums' ;
6+ import { RouteTitle } from '../enums' ;
77import type { Route } from '../interfaces' ;
88
99export const MY_NAMES_ROUTE : Route = {
10- title : ProtectedRouteTitle . MyNames ,
10+ title : RouteTitle . MyNames ,
1111 path : '/my-names' ,
1212 id : 'my-names' ,
1313} ;
1414
1515export const AUCTION_ROUTE : Route = {
16- title : ProtectedRouteTitle . Auction ,
16+ title : RouteTitle . Auction ,
1717 path : '/auctions' ,
1818 id : 'auctions' ,
1919} ;
2020
21+ export const DOCS_ROUTE : Route = {
22+ title : RouteTitle . Documentation ,
23+ path : 'https://docs.iotanames.com' ,
24+ isExternal : true ,
25+ } ;
26+
2127export const PROTECTED_ROUTES = [ MY_NAMES_ROUTE ] as const satisfies Route [ ] ;
2228
23- export const PUBLIC_ROUTES : Route [ ] = [ AUCTION_ROUTE ] as const satisfies Route [ ] ;
29+ export const PUBLIC_ROUTES : Route [ ] = [ AUCTION_ROUTE , DOCS_ROUTE ] as const satisfies Route [ ] ;
2430
2531export const CONNECT_ROUTE : Route = {
2632 path : '/' ,
Original file line number Diff line number Diff line change 22// SPDX-License-Identifier: Apache-2.0
33
44export * from './theme.enums' ;
5- export * from './protectedRouteTitle .enums' ;
5+ export * from './routeTitle .enums' ;
Original file line number Diff line number Diff line change 11// Copyright (c) 2025 IOTA Stiftung
22// SPDX-License-Identifier: Apache-2.0
33
4- export enum ProtectedRouteTitle {
4+ export enum RouteTitle {
55 MyNames = 'My Names' ,
66 Auction = 'Auctions' ,
7+ Documentation = 'Documentation' ,
78}
Original file line number Diff line number Diff line change @@ -16,4 +16,9 @@ export type ProtectedRoute = BaseRoute & {
1616 id : string ;
1717} ;
1818
19- export type Route = PublicRoute | ProtectedRoute ;
19+ export type ExternalRoute = BaseRoute & {
20+ isExternal : true ;
21+ id ?: string ;
22+ } ;
23+
24+ export type Route = PublicRoute | ProtectedRoute | ExternalRoute ;
You can’t perform that action at this time.
0 commit comments