diff --git a/web/src/api/invites.ts b/web/src/api/invites.ts index 97a8714..9aed0e8 100644 --- a/web/src/api/invites.ts +++ b/web/src/api/invites.ts @@ -42,6 +42,6 @@ export const createInvite = ( */ export const listNonMemberUsers = (bandId: string, search?: string) => { // TODO: Implement this backend endpoint if needed - // For now, can use existing member search with filter + // For now, just return empty - the invite flow works with tokens return Promise.resolve([] as { id: string; display_name: string; email: string }[]); }; diff --git a/web/src/components/InviteManagement.tsx b/web/src/components/InviteManagement.tsx index 1a32aea..bdf4e42 100644 --- a/web/src/components/InviteManagement.tsx +++ b/web/src/components/InviteManagement.tsx @@ -1,11 +1,10 @@ import React, { useState, useEffect } from "react"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { listInvites, revokeInvite } from "../api/invites"; -import { BandInviteList, BandInviteListItem } from "../types/invite"; +import { BandInviteListItem } from "../types/invite"; interface InviteManagementProps { bandId: string; - currentMemberId: string; } /** @@ -14,7 +13,7 @@ interface InviteManagementProps { * - Revoke invites * - Show invite status */ -export function InviteManagement({ bandId, currentMemberId }: InviteManagementProps) { +export function InviteManagement({ bandId }: InviteManagementProps) { const [isRefreshing, setIsRefreshing] = useState(false); // Fetch invites @@ -65,13 +64,7 @@ export function InviteManagement({ bandId, currentMemberId }: InviteManagementPr } }; - // Tell user to refresh if needed - useEffect(() => { - if (isRefreshing) { - const timer = setTimeout(() => refetch(), 1000); - return () => clearTimeout(timer); - } - }, [isRefreshing, refetch]); + /** * Copy invite token to clipboard diff --git a/web/src/pages/BandPage.tsx b/web/src/pages/BandPage.tsx index e18cadd..7e694d4 100644 --- a/web/src/pages/BandPage.tsx +++ b/web/src/pages/BandPage.tsx @@ -4,7 +4,6 @@ import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query"; import { getBand } from "../api/bands"; import { api } from "../api/client"; import { InviteManagement } from "../components/InviteManagement"; -import { UserSearch } from "../components/UserSearch"; interface SongSummary { id: string; @@ -292,17 +291,7 @@ export function BandPage() { {/* Search for users to invite (new feature) */} - { - // Directly invite the user (backend needs to handle this) - console.log(`Inviting ${user.display_name} to ${bandId}`); - // For now, we'll just log - the backend can handle email if needed - alert(`Would invite ${user.display_name} (${user.email}) to this band!`); - }} - bandId={bandId!} - currentMemberId={currentMemberId} - excludedIds={members?.map(m => m.id) || []} - /> + {/* Temporarily hide user search until backend supports it */} )} @@ -353,9 +342,7 @@ export function BandPage() { {/* Admin: Invite Management Section (new feature) */} - {amAdmin && ( - - )} + {amAdmin && } {/* Recordings header */} diff --git a/web/src/types/invite.ts b/web/src/types/invite.ts index 4d8ee42..f7d6607 100644 --- a/web/src/types/invite.ts +++ b/web/src/types/invite.ts @@ -1,4 +1,4 @@ -import { Member } from "./member"; + /** * Individual invite item for listing