mirror of
https://github.com/yude-jp/yude.jp
synced 2024-12-22 20:20:09 +09:00
Fix syntax
This commit is contained in:
parent
cb460b9b7f
commit
68679ca4e8
@ -35,7 +35,7 @@ export default function Minecraft(props) {
|
|||||||
const offline = t('minecraft:offline')
|
const offline = t('minecraft:offline')
|
||||||
const loading = t('minecraft:loading')
|
const loading = t('minecraft:loading')
|
||||||
return (
|
return (
|
||||||
<p className="text-center">
|
<div className="text-center">
|
||||||
{(() => {
|
{(() => {
|
||||||
if (status == true) {
|
if (status == true) {
|
||||||
if (player == undefined || player == 0) {
|
if (player == undefined || player == 0) {
|
||||||
@ -48,6 +48,7 @@ export default function Minecraft(props) {
|
|||||||
return <span>{loading}</span>
|
return <span>{loading}</span>
|
||||||
}
|
}
|
||||||
})()}
|
})()}
|
||||||
|
|
||||||
{(() => {
|
{(() => {
|
||||||
if (data.players && data.players.list){
|
if (data.players && data.players.list){
|
||||||
var list = [];
|
var list = [];
|
||||||
@ -56,12 +57,12 @@ export default function Minecraft(props) {
|
|||||||
url.push('https://mc-heads.net/avatar/' + data.players.list[i])
|
url.push('https://mc-heads.net/avatar/' + data.players.list[i])
|
||||||
}
|
}
|
||||||
for (var i in url){
|
for (var i in url){
|
||||||
list.push(<Image src={url[i]} className="inline" height="50" width="50" />)
|
list.push(<Image src={url[i]} key={i} className="inline" height="50" width="50" />)
|
||||||
}
|
}
|
||||||
return <div>{list}</div>
|
return <div>{list}</div>
|
||||||
}
|
}
|
||||||
})()}
|
})()}
|
||||||
</p>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user