new: usr: Add opportunity to use profile picture. #4
This commit is contained in:
@@ -2,6 +2,19 @@ import React from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import ProfileCharts from './components/ProfileCharts';
|
||||
import BattleDialog from './components/BattleDialog';
|
||||
import AvatarUpload from './components/AvatarUpload';
|
||||
|
||||
const avatarRoot = document.getElementById('profile-avatar-root');
|
||||
if (avatarRoot) {
|
||||
const { uploadUrl, thumbUrl, initials } = avatarRoot.dataset;
|
||||
createRoot(avatarRoot).render(
|
||||
<AvatarUpload
|
||||
uploadUrl={uploadUrl}
|
||||
initialThumbUrl={thumbUrl || null}
|
||||
initials={initials}
|
||||
/>,
|
||||
);
|
||||
}
|
||||
|
||||
const chartsRoot = document.getElementById('profile-charts-root');
|
||||
if (chartsRoot) {
|
||||
|
||||
Reference in New Issue
Block a user