Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoGresse committed Nov 26, 2023
1 parent f369c0b commit 0d6cb9d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/events/page/sponsors/EventSponsors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import { FirestoreQueryLoaderAndErrorDisplay } from '../../../components/Firesto
import { useSponsors } from '../../../services/hooks/useSponsors'
import { SponsorCategoryItem } from './components/SponsorCategoryItem'
import { NewCategoryDialog } from './components/NewCategoryDialog'
import { DndProvider } from 'react-dnd'
import { HTML5Backend } from 'react-dnd-html5-backend'
import { DragDropContext, Droppable, DropResult, ResponderProvided } from '@hello-pangea/dnd'
import { DragDropContext, Droppable, DropResult } from '@hello-pangea/dnd'
import { updateSponsors } from '../../actions/updateSponsors'

export type EventSponsorsProps = {
Expand All @@ -24,7 +22,7 @@ export const EventSponsors = ({ event }: EventSponsorsProps) => {
return <FirestoreQueryLoaderAndErrorDisplay hookResult={sponsors} />
}

const onDragEnd = async (result: DropResult, provided: ResponderProvided): any => {
const onDragEnd = async (result: DropResult): Promise<any> => {
// dropped outside the list
if (!result.destination) {
return
Expand Down Expand Up @@ -73,7 +71,7 @@ export const EventSponsors = ({ event }: EventSponsorsProps) => {
<Card sx={{ paddingX: 2, minHeight: '50vh' }}>
<DragDropContext onDragEnd={onDragEnd}>
<Droppable droppableId="droppable">
{(provided, snapshot) => (
{(provided) => (
<div {...provided.droppableProps} ref={provided.innerRef}>
{sponsorsData.map((category: SponsorCategory, index: number) => (
<SponsorCategoryItem
Expand Down

0 comments on commit 0d6cb9d

Please sign in to comment.