feat: show list name on header
This commit is contained in:
@@ -13,6 +13,11 @@ export function useLists() {
|
||||
return useQuery(listsQueryOptions())
|
||||
}
|
||||
|
||||
/** The list a user lands on: their primary one, falling back to the first. */
|
||||
export function pickPrimaryList(lists: ShoppingListSummary[]): ShoppingListSummary | undefined {
|
||||
return lists.find((list) => list.isPrimary) ?? lists[0]
|
||||
}
|
||||
|
||||
export function useCreateList() {
|
||||
const queryClient = useQueryClient()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user