Instead of having the header "Hunts you belong to" followed by nothing.
continue
hunt_blocks += hunt_block(turb, hunt)
+ if len(hunt_blocks):
+ hunt_blocks = [
+ section_block(text_block("*Hunts you belong to*")),
+ divider_block(),
+ * hunt_blocks
+ ]
+ else:
+ hunt_blocks = [
+ section_block(text_block("You do not belong to any hunts"))
+ ]
+
return {
"type": "home",
"blocks": [
- section_block(text_block("*Hunts you belong to*")),
- divider_block(),
* hunt_blocks,
actions_block(button_block("New hunt", "new_hunt"))
]