Skip to content

Commit 3aa5ddf

Browse files
Venkataramanan VenkateswaranVenkataramanan Venkateswaran
authored andcommitted
Fix: timelog redirection when opening on new tab in user management page
1 parent 5b7948d commit 3aa5ddf

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/components/UserManagement/UserTableData.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,13 @@ const UserTableData = React.memo(props => {
230230
return;
231231
}
232232

233+
const url = `${window.location.origin}/timelog/${props.user._id}#currentWeek`;
234+
233235
if (e.metaKey || e.ctrlKey || e.button === 1) {
234-
window.open(`/timelog/${props.user._id}#currentWeek`);
236+
window.open(url, '_blank', 'noopener');
235237
return;
236238
}
237-
238-
e.preventDefault(); // prevent full reload
239+
e.preventDefault();
239240
history.push(`/timelog/${props.user._id}#currentWeek`);
240241
}}
241242
/>

0 commit comments

Comments
 (0)