From a27de26ef02bda594c31f6afc8b53770038fb99b Mon Sep 17 00:00:00 2001 From: J Francisco Rader Date: Mon, 8 Feb 2021 00:51:00 -0500 Subject: [PATCH] Use NavLink --- phone/src/Phone.tsx | 3 +-- phone/src/os/notifications/components/NotificationIcon.tsx | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/phone/src/Phone.tsx b/phone/src/Phone.tsx index da4fd9b..dc1f468 100644 --- a/phone/src/Phone.tsx +++ b/phone/src/Phone.tsx @@ -42,7 +42,6 @@ InjectDebugData([ ]); function Phone() { - const history = useHistory(); const quickAccess = useQuickAccess(); useNuiService(); usePhoneService(); @@ -109,7 +108,7 @@ function Phone() { icon: ( history.push(qa.path)} + to={qa.path} /> ), }))} diff --git a/phone/src/os/notifications/components/NotificationIcon.tsx b/phone/src/os/notifications/components/NotificationIcon.tsx index 6aed85d..831eb71 100644 --- a/phone/src/os/notifications/components/NotificationIcon.tsx +++ b/phone/src/os/notifications/components/NotificationIcon.tsx @@ -1,14 +1,15 @@ import React from 'react'; import { IconButton } from '@material-ui/core'; +import { NavLink } from 'react-router-dom'; interface INotificationIcon { icon: JSX.Element; - onClick(e: any): void; + to: string; } -export const NotificationIcon = ({ icon, onClick }: INotificationIcon) => { +export const NotificationIcon = ({ icon, to }: INotificationIcon) => { return ( - + {icon} );