File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 11'use client' ;
22
33import { focusRing , style } from '@react-spectrum/s2/style' with { type : 'macro' } ;
4+ import { getBaseUrl } from './pageUtils' ;
45import { LinkProps , Link as S2Link } from '@react-spectrum/s2' ;
56import { Link as RACLink , LinkProps as RACLinkProps } from 'react-aria-components' ;
67import React from 'react' ;
@@ -11,12 +12,9 @@ export function Link({href, ...props}: LinkProps) {
1112 ) ;
1213}
1314
15+ const baseUrl = getBaseUrl ( ( process . env . LIBRARY as any ) || 'react-aria' ) ;
1416export function getAnchorProps ( href ) {
15- if ( ! / ^ h t t p / . test ( href ) || / l o c a l h o s t | r e a c t s p e c t r u m \. b l o b \. c o r e \. w i n d o w s \. n e t | r e a c t - s p e c t r u m \. ( c o r p \. ) ? a d o b e \. c o m | ^ # / . test ( href ) ) {
16- return { } ;
17- }
18-
19- if ( / ^ \/ / . test ( href ) ) {
17+ if ( ! / ^ h t t p / . test ( href ) || href . startsWith ( baseUrl ) ) {
2018 return { } ;
2119 }
2220
You can’t perform that action at this time.
0 commit comments