enroll team polish?
This commit is contained in:
@@ -21,6 +21,7 @@ interface TeamFormProps {
|
||||
initialValues?: Partial<TeamInput>;
|
||||
teamId?: string;
|
||||
tournamentId?: string;
|
||||
onSubmit?: (teamId: string) => void;
|
||||
}
|
||||
|
||||
const TeamForm = ({
|
||||
@@ -28,6 +29,7 @@ const TeamForm = ({
|
||||
initialValues,
|
||||
teamId,
|
||||
tournamentId,
|
||||
onSubmit
|
||||
}: TeamFormProps) => {
|
||||
const isEditMode = !!teamId;
|
||||
|
||||
@@ -103,7 +105,13 @@ const TeamForm = ({
|
||||
: "Failed to create team";
|
||||
|
||||
mutation(teamData, {
|
||||
onSuccess: async (team) => {
|
||||
onSuccess: async (team: any) => {
|
||||
console.log(team)
|
||||
queryClient.invalidateQueries({ queryKey: teamKeys.list });
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: teamKeys.details(team.id),
|
||||
});
|
||||
|
||||
if (logo && team) {
|
||||
try {
|
||||
const formData = new FormData();
|
||||
@@ -122,10 +130,8 @@ const TeamForm = ({
|
||||
|
||||
const result = await response.json();
|
||||
|
||||
queryClient.invalidateQueries({ queryKey: teamKeys.list });
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: teamKeys.details(result.team!.id),
|
||||
});
|
||||
console.log('here for some reason', result)
|
||||
|
||||
queryClient.setQueryData(
|
||||
tournamentKeys.details(result.team!.id),
|
||||
result.team
|
||||
@@ -137,7 +143,10 @@ const TeamForm = ({
|
||||
toast.error(logoErrorMessage);
|
||||
logger.error("Team logo upload error", error);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
if (team && team.id) {
|
||||
onSubmit?.(team.id)
|
||||
}
|
||||
close();
|
||||
},
|
||||
|
||||
@@ -16,7 +16,6 @@ interface SongSummaryProps {
|
||||
}
|
||||
|
||||
const SongSummary = ({ song }: SongSummaryProps) => {
|
||||
// Format time helper
|
||||
const formatTime = (seconds: number | undefined) => {
|
||||
if (seconds === undefined) return null;
|
||||
const minutes = Math.floor(seconds / 60);
|
||||
@@ -24,7 +23,6 @@ const SongSummary = ({ song }: SongSummaryProps) => {
|
||||
return `${minutes}:${remainingSeconds.toString().padStart(2, '0')}`;
|
||||
};
|
||||
|
||||
// If no song selected
|
||||
if (!song?.song_name) {
|
||||
return (
|
||||
<Group gap="xs" c="dimmed">
|
||||
|
||||
Reference in New Issue
Block a user