From 007860f8f771a7ee62b1c384fbe4f741528a75d5 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Mon, 30 May 2022 14:26:54 -0400 Subject: react: Add Router hook & fix typescript issues (#68) * add rollup watch command, add pnpm lockfile * wait for react * add WIP patcher, window hook, and webpack * fix typescript, fix React, lint, add pnpm to gitignore * actually fix react * show frontend JS errors in console * cleanup * Add Router hook * Remove console.log * Expose routerHook in createPluginAPI Co-authored-by: Jonas Dellinger --- frontend/src/components/TitleView.tsx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'frontend/src/components/TitleView.tsx') diff --git a/frontend/src/components/TitleView.tsx b/frontend/src/components/TitleView.tsx index a9e1017a..8ca81028 100644 --- a/frontend/src/components/TitleView.tsx +++ b/frontend/src/components/TitleView.tsx @@ -1,23 +1,25 @@ -import { staticClasses, DialogButton } from 'decky-frontend-lib'; +import { DialogButton, staticClasses } from 'decky-frontend-lib'; import { VFC } from 'react'; -import { FaShoppingBag } from "react-icons/fa"; +import { FaShoppingBag } from 'react-icons/fa'; import { useDeckyState } from './DeckyState'; const TitleView: VFC = () => { const { activePlugin } = useDeckyState(); - const openPluginStore = () => fetch("http://127.0.0.1:1337/methods/open_plugin_store", {method: "POST"}); + const openPluginStore = () => fetch('http://127.0.0.1:1337/methods/open_plugin_store', { method: 'POST' }); if (activePlugin === null) { - return
- Decky -
- + return ( +
+ Decky +
+ - +
-
; +
+ ); } return ( -- cgit v1.2.3