aboutsummaryrefslogtreecommitdiff
path: root/CustomApps/legacyLibrary/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'CustomApps/legacyLibrary/index.js')
-rw-r--r--CustomApps/legacyLibrary/index.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/CustomApps/legacyLibrary/index.js b/CustomApps/legacyLibrary/index.js
new file mode 100644
index 0000000..b435ddc
--- /dev/null
+++ b/CustomApps/legacyLibrary/index.js
@@ -0,0 +1,45 @@
+// this part was mostly copied from an example
+
+// Grab any variables you need
+const react = Spicetify.React;
+const reactDOM = Spicetify.ReactDOM;
+const {
+ URI,
+ React: { useState, useEffect, useCallback },
+ Platform: { History },
+} = Spicetify;
+
+// this is called when the page is open
+function render() {
+ Spicetify.Platform.History.replace("collection");
+ // element.classList.add("main-yourLibraryX-navLinkActive", "active");
+ return react.createElement(Grid, { title: "Open in the main view" });
+}
+
+//builds components of the page
+class Grid extends react.Component {
+ constructor(props) {
+ super(props);
+ Object.assign(this, props);
+ this.state = {
+ foo: "bar", //dont know what these do but its working so ill leave them be
+ data: "etc"
+ };
+ }
+
+ render() {
+ return react.createElement("section", {
+ className: "betterLibSection",
+ },
+ react.createElement("div",{
+ className: "betterLibBox"
+ },
+ react.createElement("div", {
+ className: "betterLibText",
+ },
+ react.createElement("h4", null, this.props.title),
+ ),
+ )
+ );
+ }
+}