refactor(events): rename component to EventJoinDialogContainer
Signed-off-by: Noa Virellia <noa@requiem.garden>
This commit is contained in:
@@ -5,7 +5,7 @@ import { Button } from '../ui/button';
|
||||
import { DialogTrigger } from '../ui/dialog';
|
||||
import { EventGridSkeleton } from './event-grid.skeleton';
|
||||
import { EventGridView } from './event-grid.view';
|
||||
import { EventJoinContainer } from './event-join.dialog.container';
|
||||
import { EventJoinDialogContainer } from './event-join.dialog.container';
|
||||
import { KycDialogContainer } from './kyc/kyc.dialog.container';
|
||||
|
||||
function JoinButton() {
|
||||
@@ -45,11 +45,11 @@ export function EventGridContainer() {
|
||||
</KycDialogContainer>
|
||||
)
|
||||
: (
|
||||
<EventJoinContainer event={eventInfo}>
|
||||
<EventJoinDialogContainer event={eventInfo}>
|
||||
<DialogTrigger asChild>
|
||||
<JoinButton />
|
||||
</DialogTrigger>
|
||||
</EventJoinContainer>
|
||||
</EventJoinDialogContainer>
|
||||
)
|
||||
)
|
||||
)}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useJoinEvent } from '@/hooks/data/useJoinEvent';
|
||||
import { Dialog } from '../ui/dialog';
|
||||
import { EventJoinDialogView } from './event-join.dialog.view';
|
||||
|
||||
export function EventJoinContainer({ event, children }: { event: EventInfo; children: React.ReactNode }) {
|
||||
export function EventJoinDialogContainer({ event, children }: { event: EventInfo; children: React.ReactNode }) {
|
||||
const { mutateAsync } = useJoinEvent();
|
||||
const join = useCallback(() => {
|
||||
mutateAsync({ body: { event_id: event.eventId } }).then(() => {
|
||||
|
||||
Reference in New Issue
Block a user