ui: filter deletedAt in History en Dashboard, soft delete in History
This commit is contained in:
parent
b043a5c1d2
commit
8e1783306a
2 changed files with 14 additions and 9 deletions
|
|
@ -19,9 +19,9 @@ export default function DashboardScreen({ navigation }: Props) {
|
|||
const load = async () => {
|
||||
await initDatabase()
|
||||
const allM = await getAllMeasurements()
|
||||
setAll(allM)
|
||||
const latestM = await getLatestMeasurement()
|
||||
setLatest(latestM)
|
||||
const visible = allM.filter(m => !m.deletedAt)
|
||||
setAll(visible)
|
||||
setLatest(visible.length > 0 ? visible[0] : null)
|
||||
}
|
||||
load()
|
||||
}, [])
|
||||
|
|
|
|||
Loading…
Reference in a new issue