add info message to Museum -> Localities tab if there are no added localities

This commit is contained in:
juhanikat
2025-08-28 15:03:08 +03:00
parent ed864e1c6c
commit aca1fbd046
@@ -23,12 +23,16 @@ export const LocalityTab = ({ isNew }: { isNew: boolean }) => {
header: 'Min Age',
},
]
if (isNew)
if (isNew) {
return (
<div>
Link localities to this museum after finalizing it by editing a locality and navigating to the museum tab there.
</div>
)
} else if (data.localities.length === 0) {
return <div>Link localities to this museum by editing a locality and navigating to the museum tab there.</div>
}
return <SimpleTable columns={columns} data={data.localities} idFieldName="lid" url="locality" />
}