Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
/* eslint-disable prefer-const */
/* eslint-disable quotes */

"use client"

import * as PropTypes from 'prop-types';
import * as React from 'react';
import * as NProgress from 'nprogress';
Expand Down Expand Up @@ -227,6 +229,7 @@ const NextTopLoader = ({
const target = event.target as HTMLElement;
const anchor = findClosestAnchor(target);
const newUrl = anchor?.href;
const isNewTab = event.ctrlKey || event.metaKey;
if (newUrl) {
const currentUrl = window.location.href;
// const newUrl = (anchor as HTMLAnchorElement).href;
Expand All @@ -249,6 +252,7 @@ const NextTopLoader = ({
isSpecialScheme ||
event.ctrlKey ||
event.metaKey ||
isNewTab
event.shiftKey ||
event.altKey ||
isHashAnchor(window.location.href, anchor.href) ||
Expand Down