NWACus / avy

Mobile-Native Viewing of NAC Avalanche Forecasts
MIT License
11 stars 7 forks source link

Utilize Capabilities API For Rendering Screens #331

Open stevekuznetsov opened 1 year ago

stevekuznetsov commented 1 year ago

The useAvalancheCenterCapabilities hook provides information not only on which avalanche centers are using the NAC platform, but also which sub-sections of that platform they are currently subscribed to. We should be using this information as the source of truth for which parts of the app are shown depending on which center you are loading a forecast for. Today some rudimentary logic exists to do this by inspecting other API endpoints, but that was done before I convinced Chris to build out this capabilities endpoint. We should thread through this data correctly and use it to make sure we're not rendering screens/tabs we don't need to, and are not asking the NAC backend for data it does not have.

cc @floatplane

stevekuznetsov commented 2 weeks ago

xref https://github.com/NWACus/avy/issues/802