import type { SupportedGame } from "../../types/game";
interface MusicDiverMyPageModalProps {
isOpen: boolean;
onClose: () => void;
game: SupportedGame | undefined;
renderAsCard?: () => void;
}
const MusicDiverMyPageModal = ({
isOpen,
onClose,
game,
renderAsCard
}: MusicDiverMyPageModalProps) => {
if (renderAsCard) {
return (
MUSIC DIVER MyPage
Import Play History via MUSIC DIVER MyPage
Export MyPage
);
}
if (!isOpen) return null;
const handleClose = () => {
onClose();
};
if(game === undefined){
return "Sorry, due to some extreme error the game you're looking for doesn't seem to exist..."
}
return (
{/* Backdrop */}
{/* Modal */}
{/* Header */}
Import {game.formattedName} Data
Follow the instructions below to import your data
{/* Instructions */}
Instructions:
Log into your MUSIC DIVER MyPage account
Navigate to the Play History (プレイ履歴) Page
Install the appropriate userscript to your browser (use an extension such
as Tampermonkey).
{/* Additional Info */}
A button will appear on the page that you can click to start the scraping process.
Upload the resulting JSON file into Mirage using the Batch-Manual Upload functionality
Verify that all data has been imported correctly
{/* Actions */}
Got it
);
};
export default MusicDiverMyPageModal;