From e21c52c28999b1e442be13b905d53f55fffba7ec Mon Sep 17 00:00:00 2001 From: chip Date: Fri, 6 Nov 2020 12:54:41 +0100 Subject: [PATCH] send app id when pressing on a app --- phone/src/ui/components/AppIcon.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/phone/src/ui/components/AppIcon.tsx b/phone/src/ui/components/AppIcon.tsx index 8b1e4be..2e3f20a 100644 --- a/phone/src/ui/components/AppIcon.tsx +++ b/phone/src/ui/components/AppIcon.tsx @@ -3,6 +3,7 @@ import { makeStyles } from "@material-ui/core/styles"; import Avatar from "@material-ui/core/Avatar"; import { green } from "@material-ui/core/colors"; import { Button } from "@material-ui/core"; +import Nui from "../../os/nui-events/utils/Nui"; interface IStyles { root: any; @@ -28,13 +29,18 @@ const useStyles = makeStyles( }) ); -export const AppIcon = ({ name, icon, backgroundColor, color }) => { +export const AppIcon = ({ id, name, icon, backgroundColor, color }) => { const classes = useStyles({ backgroundColor: backgroundColor || green[50], color: color || green[400], }); + + const openAppCallback = () => { + Nui.send(`phone:app:${id}`) + } + return ( -