Skip to content

Commit cd8b3c1

Browse files
committed
fix(custom-apps): directly access ReactDOM
1 parent 2f81419 commit cd8b3c1

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

CustomApps/lyrics-plus/TabBar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const TopBarContent = ({ links, activeLink, lockLink, switchCallback, lockCallba
9393
};
9494

9595
const TabBarContext = ({ children }) => {
96-
return reactDOM.createPortal(
96+
return Spicetify.ReactDOM.createPortal(
9797
react.createElement(
9898
"div",
9999
{

CustomApps/lyrics-plus/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
const react = Spicetify.React;
77
const { useState, useEffect, useCallback, useMemo, useRef } = react;
88
/** @type {import("react").ReactDOM} */
9-
const reactDOM = Spicetify.ReactDOM;
109
const spotifyVersion = Spicetify.Platform.version;
1110

1211
// Define a function called "render" to specify app entry point
@@ -1264,8 +1263,8 @@ class LyricsContainer extends react.Component {
12641263
})
12651264
);
12661265

1267-
if (this.state.isFullscreen) return reactDOM.createPortal(out, this.fullscreenContainer);
1268-
if (fadLyricsContainer) return reactDOM.createPortal(out, fadLyricsContainer);
1266+
if (this.state.isFullscreen) return Spicetify.ReactDOM.createPortal(out, this.fullscreenContainer);
1267+
if (fadLyricsContainer) return Spicetify.ReactDOM.createPortal(out, fadLyricsContainer);
12691268
return out;
12701269
}
12711270
}

CustomApps/reddit/TabBar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const TopBarContent = ({ links, activeLink, switchCallback }) => {
7676
};
7777

7878
const TabBarContext = ({ children }) => {
79-
return reactDOM.createPortal(
79+
return Spicetify.ReactDOM.createPortal(
8080
react.createElement(
8181
"div",
8282
{

0 commit comments

Comments
 (0)