From 99b4b939bdd2140aecf19ddb09a59b44e9cd117d Mon Sep 17 00:00:00 2001
From: AAGaming <aagaming00@protonmail.com>
Date: Fri, 17 Jun 2022 18:43:53 -0400
Subject: Implement React-based plugin store (#81)

Co-authored-by: TrainDoctor <11465594+TrainDoctor@users.noreply.github.com>
Co-authored-by: WerWolv <werwolv98@gmail.com>
---
 frontend/src/plugin-loader.tsx | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'frontend/src/plugin-loader.tsx')

diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx
index 73f65415..eb3344a3 100644
--- a/frontend/src/plugin-loader.tsx
+++ b/frontend/src/plugin-loader.tsx
@@ -4,6 +4,7 @@ import { FaPlug } from 'react-icons/fa';
 import { DeckyState, DeckyStateContextProvider } from './components/DeckyState';
 import LegacyPlugin from './components/LegacyPlugin';
 import PluginView from './components/PluginView';
+import StorePage from './components/store/Store';
 import TitleView from './components/TitleView';
 import Logger from './logger';
 import { Plugin } from './plugin';
@@ -43,6 +44,8 @@ class PluginLoader extends Logger {
       ),
       icon: <FaPlug />,
     });
+
+    this.routerHook.addRoute('/decky/store', () => <StorePage />);
   }
 
   public addPluginInstallPrompt(artifact: string, version: string, request_id: string) {
@@ -71,6 +74,10 @@ class PluginLoader extends Logger {
     }
   }
 
+  public deinit() {
+    this.routerHook.removeRoute('/decky/store');
+  }
+
   public async importPlugin(name: string) {
     try {
       if (this.reloadLock) {
-- 
cgit v1.2.3

