2025-02-27 13:47:45 +00:00
|
|
|
import 'react-app-polyfill/ie9';
|
|
|
|
|
import 'react-app-polyfill/stable';
|
|
|
|
|
|
|
|
|
|
import React from "react";
|
|
|
|
|
import ReactDOM from "react-dom";
|
|
|
|
|
import Main from "../src/Main.js"
|
|
|
|
|
import TemplatePage from "../src/components/jamtracks/JKJamTracksLandingTemplatePage.js"
|
2025-03-03 13:18:54 +00:00
|
|
|
import ArtistTemplatePage from "../src/components/jamtracks/JKJamTracksArtistLandingTemplatePage.js"
|
2025-02-27 13:47:45 +00:00
|
|
|
import '../src/helpers/initFA';
|
|
|
|
|
import '../src/i18n/config';
|
|
|
|
|
|
|
|
|
|
const rootElement = document.getElementById("root");
|
|
|
|
|
|
|
|
|
|
// Ensure props are passed correctly (or fetch from the server)
|
|
|
|
|
|
2025-03-03 13:18:54 +00:00
|
|
|
const props = window.jamtrack_data;
|
2025-02-27 13:47:45 +00:00
|
|
|
|
|
|
|
|
console.log('init', props, rootElement);
|
|
|
|
|
|
|
|
|
|
// Hydrate the server-rendered React component
|
|
|
|
|
//ReactDOM.hydrate(React.createElement(TemplatePage, props), rootElement);
|
|
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
|
<Main>
|
2025-03-03 13:18:54 +00:00
|
|
|
{props.song ? <TemplatePage {...props} /> : <ArtistTemplatePage {...props} /> }
|
2025-02-27 13:47:45 +00:00
|
|
|
</Main>, rootElement
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|