feat(events): add event join functionality with no kyc

Signed-off-by: Noa Virellia <noa@requiem.garden>
This commit is contained in:
2026-02-07 17:05:54 +08:00
parent c43c37a127
commit eddc23a2e8
8 changed files with 128 additions and 22 deletions

View File

@@ -2,6 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-vite';
import { EventCardSkeleton } from '@/components/events/event-card.skeleton';
import { EventCardView } from '@/components/events/event-card.view';
import { Button } from '@/components/ui/button';
import { exampleEvent } from './event.example';
const meta = {
title: 'Events/EventCard',
@@ -13,17 +14,7 @@ type Story = StoryObj<typeof meta>;
export const Primary: Story = {
args: {
eventInfo: {
eventId: '1',
type: 'official',
requireKyc: true,
isJoined: false,
coverImage: 'https://github.com/NixOS/nixos-artwork/blob/master/wallpapers/nix-wallpaper-watersplash.png?raw=true',
eventName: 'Nix CN Conference 26.05',
description: 'Event Description',
startTime: new Date('2026-06-13T04:00:00.000Z'),
endTime: new Date('2026-06-14T04:00:00.000Z'),
},
eventInfo: exampleEvent,
actionFooter: <Button className="w-full"></Button>,
},
};

View File

@@ -0,0 +1,13 @@
import type { EventInfo } from '@/components/events/types';
export const exampleEvent: EventInfo = {
eventId: '1',
type: 'official',
requireKyc: true,
isJoined: false,
coverImage: 'https://github.com/NixOS/nixos-artwork/blob/master/wallpapers/nix-wallpaper-watersplash.png?raw=true',
eventName: 'Nix CN Conference 26.05',
description: 'Event Description',
startTime: new Date('2026-06-13T04:00:00.000Z'),
endTime: new Date('2026-06-14T04:00:00.000Z'),
};

View File

@@ -0,0 +1,26 @@
import type { Meta, StoryObj } from '@storybook/react-vite';
import { EventJoinDialogView } from '@/components/events/event-join.dialog.view';
import { Dialog } from '@/components/ui/dialog';
import { exampleEvent } from './event.example';
const meta = {
title: 'Events/JoinDialog',
component: EventJoinDialogView,
decorators: [
Story => (
<Dialog open={true}>
<Story />
</Dialog>
),
],
} satisfies Meta<typeof EventJoinDialogView>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Confirm: Story = {
args: {
event: exampleEvent,
onJoinEvent: () => { },
},
};