diff options
Diffstat (limited to 'app/index.js')
-rw-r--r-- | app/index.js | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/app/index.js b/app/index.js new file mode 100644 index 0000000..b6f1a9b --- /dev/null +++ b/app/index.js @@ -0,0 +1,57 @@ +// Grab any variables you need +const react = Spicetify.React; +const reactDOM = Spicetify.ReactDOM; +const { + URI, + React: { useState, useEffect, useCallback }, + Platform: { History }, +} = Spicetify; + +// The main custom app render function. The component returned is what is rendered in Spotify. +function render() { + betterlibrary(); + return react.createElement(Grid, { title: "loading..." }); +} + +// Our main component +class Grid extends react.Component { + constructor(props) { + super(props); + Object.assign(this, props); + this.state = { + foo: "bar", + data: "etc" + }; + // console.log("test"); + } + + render() { + return react.createElement("section", { + className: "contentSpacing", + }, + react.createElement("div", { + className: "betterlibheader", + }, react.createElement("h1", null, this.props.title), + ), + ); + // ), react.createElement("div", { + // id: "marketplace-grid", + // className: "main-gridContainer-gridContainer", + // "data-tab": CONFIG.activeTab, + // style: { + // "--minimumColumnWidth": "180px", + // }, + // }, [...cardList]), + // react.createElement("footer", { + // style: { + // margin: "auto", + // textAlign: "center", + // }, + // }, !this.state.endOfList && (this.state.rest ? react.createElement(LoadMoreIcon, { onClick: this.loadMore.bind(this) }) : react.createElement(LoadingIcon)), + // ), react.createElement(TopBarContent, { + // switchCallback: this.switchTo.bind(this), + // links: CONFIG.tabs, + // activeLink: CONFIG.activeTab, + // }); + } +}
\ No newline at end of file |