      // Retrieve first office user can manage bookings for
      setSelectedOffice(findOffice(user.permissions.officesCanManageBookingsFor[0].name));
    }
  }, [user, offices, selectedOffice, findOffice]);

  useEffect(() => {
    if (selectedOffice === undefined) {
      setSelectedWithSlots(undefined);
    } else {
      setLoading(true);
      getOffice(selectedOffice.id).then((result) => {