From d389b403b521c48920d872c6ddd133b63ada2528 Mon Sep 17 00:00:00 2001
From: TrainDoctor <traindoctor@protonmail.com>
Date: Sun, 30 Oct 2022 10:38:49 -0700
Subject: Disable store selection until PRs actually deploy to testing

---
 frontend/src/store.tsx | 76 +++++++++++++++++++++++++++-----------------------
 1 file changed, 41 insertions(+), 35 deletions(-)

(limited to 'frontend/src/store.tsx')

diff --git a/frontend/src/store.tsx b/frontend/src/store.tsx
index 9b1c5d2e..3ef3e361 100644
--- a/frontend/src/store.tsx
+++ b/frontend/src/store.tsx
@@ -27,41 +27,47 @@ export type PluginUpdateMapping = Map<string, StorePluginVersion>;
 
 export async function getPluginList(): Promise<StorePlugin[]> {
   let version = await window.DeckyPluginLoader.updateVersion();
-  let store = await getSetting<Store>('store', Store.Default);
-  let customURL = await getSetting<string>('store-url', 'https://plugins.deckbrew.xyz/plugins');
-  let storeURL;
-  if (!store) {
-    console.log('Could not get a default store, using Default.');
-    await setSetting('store-url', Store.Default);
-    return fetch('https://plugins.deckbrew.xyz/plugins', {
-      method: 'GET',
-      headers: {
-        'X-Decky-Version': version.current,
-      },
-    }).then((r) => r.json());
-  } else {
-    switch (+store) {
-      case Store.Default:
-        storeURL = 'https://plugins.deckbrew.xyz/plugins';
-        break;
-      case Store.Testing:
-        storeURL = 'https://testing.deckbrew.xyz/plugins';
-        break;
-      case Store.Custom:
-        storeURL = customURL;
-        break;
-      default:
-        console.error('Somehow you ended up without a standard URL, using the default URL.');
-        storeURL = 'https://plugins.deckbrew.xyz/plugins';
-        break;
-    }
-    return fetch(storeURL, {
-      method: 'GET',
-      headers: {
-        'X-Decky-Version': version.current,
-      },
-    }).then((r) => r.json());
-  }
+  return fetch('https://plugins.deckbrew.xyz/plugins', {
+    method: 'GET',
+    headers: {
+      'X-Decky-Version': version.current,
+    },
+  }).then((r) => r.json());
+  // let store = await getSetting<Store>('store', Store.Default);
+  // let customURL = await getSetting<string>('store-url', 'https://plugins.deckbrew.xyz/plugins');
+  // let storeURL;
+  // if (!store) {
+  //   console.log('Could not get a default store, using Default.');
+  //   await setSetting('store-url', Store.Default);
+  //   return fetch('https://plugins.deckbrew.xyz/plugins', {
+  //     method: 'GET',
+  //     headers: {
+  //       'X-Decky-Version': version.current,
+  //     },
+  //   }).then((r) => r.json());
+  // } else {
+  //   switch (+store) {
+  //     case Store.Default:
+  //       storeURL = 'https://plugins.deckbrew.xyz/plugins';
+  //       break;
+  //     case Store.Testing:
+  //       storeURL = 'https://testing.deckbrew.xyz/plugins';
+  //       break;
+  //     case Store.Custom:
+  //       storeURL = customURL;
+  //       break;
+  //     default:
+  //       console.error('Somehow you ended up without a standard URL, using the default URL.');
+  //       storeURL = 'https://plugins.deckbrew.xyz/plugins';
+  //       break;
+  //   }
+  //   return fetch(storeURL, {
+  //     method: 'GET',
+  //     headers: {
+  //       'X-Decky-Version': version.current,
+  //     },
+  //   }).then((r) => r.json());
+  // }
 }
 
 export async function installFromURL(url: string) {
-- 
cgit v1.2.3

