From 459987b2b37be85ed3bd7ce6b5095f1cf5acc3c8 Mon Sep 17 00:00:00 2001 From: Dylan <36567925+Airyzz@users.noreply.github.com> Date: Sun, 28 Aug 2022 19:46:26 +0930 Subject: [PATCH] Remove unnecessary imports --- src/util/linkHandlers.jsx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) 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(); }