|
1 | 1 | import arrow_icon from '@cuhacking/shared/assets/icons/general/arrow-1.svg' |
2 | | -import { Button } from '@cuhacking/shared/ui/button' |
3 | 2 | import { GlassmorphicCard } from '@cuhacking/shared/ui/glassmorphic-card' |
4 | 3 | import { TerminalText } from '@cuhacking/shared/ui/terminal-text/terminal-text' |
5 | 4 | import { Typography } from '@cuhacking/shared/ui/typography' |
6 | 5 | import { cn } from '@cuhacking/shared/utils/cn' |
7 | 6 |
|
8 | | -type Status = 'pending' | 'accepted' | 'rejected' |
9 | | - |
10 | 7 | interface UserStatusProps { |
11 | 8 | className?: string |
12 | 9 | name: string |
13 | | - status?: Status |
14 | 10 | } |
15 | 11 |
|
16 | | -export function UserStatus({ name, status = 'pending', className }: UserStatusProps) { |
17 | | - let additionalContent |
18 | | - let messageContent |
19 | | - |
20 | | - switch (status) { |
21 | | - case 'accepted': |
22 | | - messageContent = 'WELCOME TO CUHACKING 2025! 💚' |
23 | | - additionalContent = ( |
24 | | - <> |
25 | | - |
26 | | - <TerminalText className="text-orange-400">!!!ACCEPTED!!!</TerminalText> |
27 | | - <TerminalText>WE HOPE TO CUHACKING!</TerminalText> |
28 | | - <Button |
29 | | - className="w-full text-black" |
30 | | - type="button" |
31 | | - variant="secondary" |
32 | | - > |
33 | | - RSVP |
34 | | - </Button> |
35 | | - </> |
36 | | - ) |
37 | | - break |
38 | | - case 'pending': |
39 | | - messageContent = 'Hi! Thank you for applying' |
40 | | - additionalContent = ( |
41 | | - <div> |
42 | | - <TerminalText> |
43 | | - <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ" target="_blank" rel="noopener noreferrer"> |
44 | | - ... coming soon |
45 | | - </a> |
46 | | - </TerminalText> |
| 12 | +export function UserStatus({ name, className }: UserStatusProps) { |
| 13 | + const messageContent = `Hi! Thank you for applying ${name} 💚` |
| 14 | + const additionalContent = ( |
| 15 | + <> |
| 16 | + <TerminalText> |
| 17 | + <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ" target="_blank" rel="noopener noreferrer"> |
| 18 | + ... coming soon |
| 19 | + </a> |
| 20 | + </TerminalText> |
47 | 21 |
|
48 | | - <TerminalText> |
49 | | - <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ" target="_blank" rel="noopener noreferrer"> |
50 | | - We hope to cuHacking 👀!!! |
51 | | - </a> |
52 | | - </TerminalText> |
53 | | - </div> |
54 | | - ) |
55 | | - break |
56 | | - case 'rejected': |
57 | | - additionalContent = ( |
58 | | - <> |
59 | | - <TerminalText>Unfortunately, we couldn't accept your application this time.</TerminalText> |
60 | | - <TerminalText>Don't be discouraged! We encourage you to apply again next year. 💪</TerminalText> |
61 | | - </> |
62 | | - ) |
63 | | - break |
64 | | - } |
| 22 | + <TerminalText> |
| 23 | + <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ" target="_blank" rel="noopener noreferrer"> |
| 24 | + We hope to cuHacking 👀!!! |
| 25 | + </a> |
| 26 | + </TerminalText> |
| 27 | + </> |
| 28 | + ) |
65 | 29 |
|
66 | 30 | return ( |
67 | 31 | <GlassmorphicCard className={cn('flex flex-col gap-2 items-start p-3', className)}> |
68 | 32 | <Typography variant="paragraph-base"> |
69 | 33 | {messageContent} |
70 | | - {' '} |
71 | | - {name} |
72 | | - {' '} |
73 | | - 💚 |
74 | 34 | </Typography> |
75 | 35 | <TerminalText |
76 | 36 | className="text-lg text-center" |
|
0 commit comments