diff --git a/plugins/Last.fm/src/index.tsx b/plugins/Last.fm/src/index.tsx index deb5d45..effb3ac 100644 --- a/plugins/Last.fm/src/index.tsx +++ b/plugins/Last.fm/src/index.tsx @@ -3,7 +3,7 @@ import { FluxDispatcher } from "@vendetta/metro/common"; import { getAssetIDByName } from "@vendetta/ui/assets"; import { showToast } from "@vendetta/ui/toasts"; import { React } from "@vendetta/metro/common"; -import { View } from "react-native"; +import { ScrollView } from "react-native"; import { Forms } from "@vendetta/ui/components"; import { lazy } from "react"; @@ -43,18 +43,18 @@ export const currentSettings = new Proxy(plugin.storage, { }, }); -// Wrap Settings component in error boundary +// Settings component with error handling const Settings = lazy(() => import("./ui/pages/Settings").catch((err) => { console.error("[Last.fm] Failed to load settings:", err); return { default: () => ( - + Failed to load Last.fm settings. Please check your connection and reload Discord. - + ), }; }), @@ -84,17 +84,15 @@ async function tryInitialize() { export default { settings: () => ( - - - Loading Last.fm settings... - - } - > - - - + + Loading Last.fm settings... + + } + > + + ), onLoad() { pluginState.pluginStopped = false; diff --git a/plugins/Last.fm/src/ui/pages/Settings.tsx b/plugins/Last.fm/src/ui/pages/Settings.tsx index 843358f..46769c3 100644 --- a/plugins/Last.fm/src/ui/pages/Settings.tsx +++ b/plugins/Last.fm/src/ui/pages/Settings.tsx @@ -4,7 +4,7 @@ import { useProxy } from "@vendetta/storage"; import { getAssetIDByName } from "@vendetta/ui/assets"; import { showToast } from "@vendetta/ui/toasts"; import { React } from "@vendetta/metro/common"; -import { View } from "react-native"; +import { ScrollView, View } from "react-native"; import { currentSettings, pluginState } from "../.."; import Constants from "../../constants"; @@ -49,7 +49,12 @@ export default function Settings() { }; return ( - + - + Status: {pluginState.pluginStopped ? "Stopped" : "Running"} @@ -186,9 +191,17 @@ export default function Settings() { - + Version 2.0.0 - + ); }