23 lines
825 B
React
23 lines
825 B
React
import React from 'react'
|
|
import ProfileWorldHistorySection from '../worlds/ProfileWorldHistorySection'
|
|
|
|
export default function TabWorlds({ worldHistory, isOwner, loading = false, error = false, onRetry }) {
|
|
return (
|
|
<div
|
|
id="tabpanel-worlds"
|
|
role="tabpanel"
|
|
aria-labelledby="tab-worlds"
|
|
className="pt-6"
|
|
>
|
|
{loading ? <p className="mb-4 text-sm text-slate-400">Loading worlds history…</p> : null}
|
|
{error ? (
|
|
<div className="mb-4 flex items-center gap-3 text-sm text-rose-300">
|
|
<span>Worlds history could not be loaded.</span>
|
|
<button type="button" onClick={onRetry} className="underline underline-offset-2">Retry</button>
|
|
</div>
|
|
) : null}
|
|
<ProfileWorldHistorySection history={worldHistory} isOwner={isOwner} />
|
|
</div>
|
|
)
|
|
}
|