//import React, { useState, useEffect } from 'react';
//import axios from 'axios';

//interface Post {
//	id: number;
//	username: string;
//	planet: number;
//}

//const ScreenApiCanvas: React.FC = () => {
//	const [posts, setPosts] = useState<Post[]>([]);
//	const [loading, setLoading] = useState(true);
//	const [error, setError] = useState<string | null>(null);
//	const searchParams = new URLSearchParams(window.location.search);
//	var id = searchParams.get('id') ?? '2';
//	var url = 'https://api.syui.ai/users/' + id;
//	useEffect(() => {
//		const fetchPosts = async () => {
//			try {
//				const response = await axios.get<Post[]>(url);
//				setPosts(response.data);
//				setLoading(false);
//			} catch (err) {
//				setError('error network api');
//				setLoading(false);
//			}
//		};
//
//		fetchPosts();
//	}, [url]);
//
//	if (loading) return <div>読み込み中...</div>;
//	if (error) return <div>{error}</div>;
//
//	return (
//		<div className="api">
//		<ul>
//		{posts.map(post => (
//			<li key={post.id}>{post.username} / M {post.planet}</li>
//		))}
//		</ul>
//		</div>
//	);
//};

import React from 'react';
const ScreenApiCanvas: React.FC = () => {
	const searchParams = new URLSearchParams(window.location.search);
	var m = searchParams.get('m') ?? '0';
	var u = searchParams.get('u') ?? 'ai';
	return (
		<div className="api">
		<p>{u} / M{m}</p>	
		</div>
	);
};

export default ScreenApiCanvas;
