Private
Public Access
1
0
Files
MineSeeker/assets/js/profile.jsx

19 lines
579 B
React
Raw Normal View History

import React from 'react';
import { createRoot } from 'react-dom/client';
import ProfileCharts from './components/ProfileCharts';
import BattleDialog from './components/BattleDialog';
const chartsRoot = document.getElementById('profile-charts-root');
if (chartsRoot) {
createRoot(chartsRoot).render(
<ProfileCharts chartData={JSON.parse(chartsRoot.dataset.chartData)} />,
);
}
const battleRoot = document.getElementById('profile-battle-root');
if (battleRoot) {
createRoot(battleRoot).render(
<BattleDialog games={JSON.parse(battleRoot.dataset.games)} />,
);
}