fix(template): EmptyState takes children, not message #13

Merged
whitlocktech merged 1 commits from fix/template-empty-state into main 2026-09-23 05:36:45 +00:00

View File

@@ -23,8 +23,12 @@ export default function Clans() {
{loading && <Loading />} {loading && <Loading />}
{error && <ErrorState error={error} />} {error && <ErrorState error={error} />}
{/* `EmptyState` renders its CHILDREN and takes no other prop. Pass the
sentence as `message=` and React drops it without a word: the panel
renders as an empty box. module-rust shipped six of those for four
phases, learned from this line when it said `message=`. */}
{data && data.clans.length === 0 && ( {data && data.clans.length === 0 && (
<EmptyState message="No clans have been reported yet." /> <EmptyState>No clans have been reported yet.</EmptyState>
)} )}
{data && data.clans.length > 0 && ( {data && data.clans.length > 0 && (