import { Fragment, useState } from 'react' import { Image, Popup } from '../../system' import { Button } from '../Button' import { GameAssetsDownloader, GameDataDownloader } from '../../../config/GameDownloader' import { handleConvertion } from '../../../tools/handleConvertion' import { Downloader } from './Downloader' import type { ConvertionHandler } from '../../../types/global' export const Downloaders: React.FC = () => { const [message, setMessage] = useState('') const [loading, setLoading] = useState(false) const callback: ConvertionHandler = (message, state = 'idle') => { switch (state) { case 'loading': setMessage(message) return setLoading(true) case 'success': setMessage(message) return setLoading(false) case 'error': setMessage(message) return setLoading(false) } } return ( xd ) }