This repository has been archived on 2022-09-16. You can view files and clone it, but cannot push or open issues/pull-requests.
2022-08-01 16:35:28 +01:00
|
|
|
import React from "react";
|
2022-07-30 22:17:32 +01:00
|
|
|
import { createRoot } from "react-dom/client";
|
2020-03-27 22:23:31 +00:00
|
|
|
import { Provider } from "react-redux";
|
|
|
|
|
|
|
|
import { store } from "./store";
|
|
|
|
import MusicPlayer from "./MusicPlayer";
|
|
|
|
import { setSource, setTitle } from "./store/music/types";
|
|
|
|
import mseq from "./Mseq_-_Journey.mp3";
|
|
|
|
|
|
|
|
const rootElement = document.getElementById("playerUI");
|
|
|
|
|
2022-08-03 01:48:06 +01:00
|
|
|
if (rootElement === null) {
|
|
|
|
throw Error("DOM seems to have failed to load. Something went very wrong.");
|
|
|
|
}
|
|
|
|
|
|
|
|
const root = createRoot(rootElement);
|
2022-07-30 22:17:32 +01:00
|
|
|
root.render(
|
2021-04-07 23:23:21 +01:00
|
|
|
<Provider store={store}>
|
|
|
|
<MusicPlayer />
|
2022-07-30 22:17:32 +01:00
|
|
|
</Provider>
|
2020-03-27 22:23:31 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
store.dispatch(setSource(mseq));
|
|
|
|
store.dispatch(
|
2021-04-07 23:23:21 +01:00
|
|
|
setTitle({
|
|
|
|
name: "Journey",
|
|
|
|
artist: "Mseq",
|
|
|
|
album: "Unknown album",
|
|
|
|
length: 192052244,
|
|
|
|
})
|
2020-03-27 22:23:31 +00:00
|
|
|
);
|