diff --git a/src/util/linkHandlers.jsx b/src/util/linkHandlers.jsx index 037f8463..bbc9029d 100644 --- a/src/util/linkHandlers.jsx +++ b/src/util/linkHandlers.jsx @@ -1,15 +1,8 @@ -import React, { useState } from 'react'; import { invoke } from '@tauri-apps/api/tauri'; -import { openReusableDialog } from '../client/action/navigation'; -import Text from '../app/atoms/text/Text'; -import RoomTile from '../app/molecules/room-tile/RoomTile'; -import initMatrix from '../client/initMatrix'; -import PopupWindow from '../app/molecules/popup-window/PopupWindow'; -import Spinner from '../app/atoms/spinner/Spinner'; import { openJoinAlias } from '../client/action/navigation'; const handlers = { - 'matrix.to': (url) => { + 'matrix.to': (url) => { openJoinAlias(url.hash.slice(2)); }, }; @@ -30,9 +23,8 @@ export default function handleLink(e) { invoke('open_link', { url: e.target.href }) .then(() => e.preventDefault()) .catch((error) => console.error(error)); - } - else { - //open in new tab + } else { + // open in new tab window.open(e.target.href); e.preventDefault(); }