Skip to content

Commit ce702f6

Browse files
committed
dont open internal links in new tab
1 parent 366ef77 commit ce702f6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/reflex-site-shared/src/reflex_site_shared/views

packages/reflex-site-shared/src/reflex_site_shared/views/footer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def dark_mode_toggle() -> rx.Component:
7979

8080

8181
def footer_link(text: str, href: str) -> rx.Component:
82-
"""External link styled for footer link columns.
82+
"""Link styled for footer link columns.
8383
8484
Returns:
8585
The component.
@@ -92,7 +92,7 @@ def footer_link(text: str, href: str) -> rx.Component:
9292
class_name="shrink-0 lg:hidden flex",
9393
),
9494
href=href,
95-
target="_blank",
95+
target="_blank" if not href.startswith("/") else "",
9696
class_name="font-[525] text-secondary-11 hover:text-secondary-12 text-sm transition-color w-full lg:w-fit flex flex-row justify-between items-center min-h-[24px]",
9797
)
9898

0 commit comments

Comments
 (0)