Skip to content

Commit b8a68c8

Browse files
authored
Husky warnings (#358)
* fix: modify api.ts * fix: remove google auth buttom * fix: fixes responsive fixes on organization * fix: minor fixes * fix: modify create organization * fix: modify create organization * fix: fix organization permission * fix: merge into main * feat: hackathon overview page * feat: hackathon overview page * feat: implement participant overview * feat: implement participant overview * feat: implement resources tab * feat: implement the submission tab * feat: implement comment tab * fix: implement provider for hackathon * fix: implement provider for hackathon * fix: minor fixes * fix: hackathon banner * fix: hackathon banner * fix: fix organization page * fix: fix organization page * fix: use transform * fix: add tagline * fix: add tagline * fix: minor fixes * fix: minor fixes * fix: fix timeline and prizes * fix: correct timeline events * fix: implement registration deadline policy * fix: implement registration deadline policy * feat: implement leave hackathon * feat: implement leave hackathon * fix: delete hackathon * fix: implement invite participants * fix: implement participant profile viewing * feat: fetch participants team * fix: redesign hackathon banner * fix: fix hackthon card
1 parent 6000738 commit b8a68c8

22 files changed

Lines changed: 551 additions & 327 deletions

File tree

app/(landing)/hackathons/[slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ export default function HackathonPage() {
298298

299299
{activeTab === 'resources' &&
300300
currentHackathon?.resources?.resources?.[0] && (
301-
<HackathonResources hackathonSlugOrId={hackathonId} />
301+
<HackathonResources />
302302
)}
303303
</div>
304304
</div>

app/(landing)/profile/[username]/profile-data.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function ProfileData({ username }: PublicProfileDataProps) {
4646
try {
4747
setLoading(true);
4848
const data = await getUserProfileByUsername(username);
49-
console.log('userData:', data); // This will log the actual data
49+
// console.log('userData:', data);
5050
setUserData(data);
5151
} catch (err) {
5252
setError(`Failed to load user profile: ${err}`);
@@ -59,11 +59,11 @@ export function ProfileData({ username }: PublicProfileDataProps) {
5959
}, [username]);
6060

6161
// This logs on every render - will show null initially, then the data after fetch
62-
useEffect(() => {
63-
if (userData) {
64-
console.log('Current userData state:', userData);
65-
}
66-
}, [userData]);
62+
// useEffect(() => {
63+
// if (userData) {
64+
// console.log('Current userData state:', userData);
65+
// }
66+
// }, [userData]);
6767

6868
if (loading) {
6969
return (

app/layout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
generateWebsiteStructuredData,
1111
} from '@/lib/structured-data';
1212
import NextTopLoader from 'nextjs-toploader';
13+
import DevelopmentStatusModal from '@/components/DevelopmentStatusModal';
1314

1415
const inter = Inter({
1516
variable: '--font-inter',
@@ -95,6 +96,7 @@ export default function RootLayout({
9596
{children}
9697
<Toaster />
9798
<CookieConsent />
99+
<DevelopmentStatusModal />
98100
</Providers>
99101
<AnalyticsWrapper />
100102
</body>
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
'use client';
2+
3+
import React, { useState, useEffect } from 'react';
4+
import { Code2, X } from 'lucide-react';
5+
import {
6+
Dialog,
7+
DialogContent,
8+
DialogDescription,
9+
DialogTitle,
10+
} from '@/components/ui/dialog';
11+
12+
const BRAND_COLOR = '#a7f950';
13+
const DEV_MODAL_KEY = 'dev-status-modal-dismissed';
14+
15+
const DevelopmentStatusModal = () => {
16+
const [isOpen, setIsOpen] = useState(false);
17+
18+
useEffect(() => {
19+
// Check if user has already dismissed the modal
20+
try {
21+
const dismissed = localStorage.getItem(DEV_MODAL_KEY);
22+
if (!dismissed) {
23+
// Show modal after a short delay
24+
const timer = setTimeout(() => {
25+
setIsOpen(true);
26+
}, 800);
27+
return () => clearTimeout(timer);
28+
}
29+
} catch {
30+
// If localStorage fails, show the modal anyway
31+
setIsOpen(true);
32+
}
33+
}, []);
34+
35+
const handleClose = () => {
36+
try {
37+
localStorage.setItem(DEV_MODAL_KEY, 'true');
38+
} catch {
39+
// Silently fail if localStorage is not available
40+
}
41+
setIsOpen(false);
42+
};
43+
44+
return (
45+
<Dialog open={isOpen} onOpenChange={setIsOpen}>
46+
<DialogContent className='max-w-md overflow-hidden border border-zinc-800 bg-zinc-900 p-0 text-white [&>button]:hidden'>
47+
{/* Header with gradient background */}
48+
<div
49+
className='relative px-6 pt-6 pb-4'
50+
style={{
51+
background: `linear-gradient(135deg, ${BRAND_COLOR}15 0%, transparent 100%)`,
52+
}}
53+
>
54+
<div className='absolute top-4 right-4'>
55+
<button
56+
onClick={handleClose}
57+
className='rounded-full p-1 transition-colors hover:bg-zinc-800'
58+
aria-label='Close modal'
59+
>
60+
<X className='h-4 w-4 text-zinc-400' />
61+
</button>
62+
</div>
63+
64+
<div className='flex items-start gap-4'>
65+
<div
66+
className='flex h-12 w-12 shrink-0 items-center justify-center rounded-xl'
67+
style={{ backgroundColor: `${BRAND_COLOR}20` }}
68+
>
69+
<Code2 className='h-6 w-6' style={{ color: BRAND_COLOR }} />
70+
</div>
71+
<div className='flex-1 pt-1'>
72+
<DialogTitle className='mb-2 text-lg font-bold text-white'>
73+
Boundless is Under Active Development
74+
</DialogTitle>
75+
</div>
76+
</div>
77+
</div>
78+
79+
{/* Content */}
80+
<div className='px-6 pb-6'>
81+
<DialogDescription className='mb-4 text-sm leading-relaxed text-zinc-400'>
82+
Welcome to Boundless! We're actively building and improving the
83+
platform. You may encounter:
84+
</DialogDescription>
85+
86+
<div className='mb-6 space-y-3'>
87+
<div className='flex items-start gap-3'>
88+
<div
89+
className='mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full'
90+
style={{ backgroundColor: `${BRAND_COLOR}20` }}
91+
>
92+
<div
93+
className='h-2 w-2 rounded-full'
94+
style={{ backgroundColor: BRAND_COLOR }}
95+
/>
96+
</div>
97+
<p className='text-sm text-zinc-300'>
98+
New features being rolled out regularly
99+
</p>
100+
</div>
101+
102+
<div className='flex items-start gap-3'>
103+
<div
104+
className='mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full'
105+
style={{ backgroundColor: `${BRAND_COLOR}20` }}
106+
>
107+
<div
108+
className='h-2 w-2 rounded-full'
109+
style={{ backgroundColor: BRAND_COLOR }}
110+
/>
111+
</div>
112+
<p className='text-sm text-zinc-300'>
113+
Occasional bugs and UI improvements in progress
114+
</p>
115+
</div>
116+
117+
<div className='flex items-start gap-3'>
118+
<div
119+
className='mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full'
120+
style={{ backgroundColor: `${BRAND_COLOR}20` }}
121+
>
122+
<div
123+
className='h-2 w-2 rounded-full'
124+
style={{ backgroundColor: BRAND_COLOR }}
125+
/>
126+
</div>
127+
<p className='text-sm text-zinc-300'>
128+
Changes to features and functionality
129+
</p>
130+
</div>
131+
</div>
132+
133+
<div className='mb-6 rounded-lg border border-zinc-800 bg-zinc-900/50 p-4'>
134+
<p className='text-xs leading-relaxed text-zinc-400'>
135+
<strong className='text-zinc-300'>Your feedback matters!</strong>{' '}
136+
Help us build the best platform by reporting issues or suggesting
137+
improvements through our support channels.
138+
</p>
139+
</div>
140+
141+
<button
142+
onClick={handleClose}
143+
className='w-full rounded-lg px-4 py-2.5 text-sm font-medium transition-colors'
144+
style={{
145+
backgroundColor: BRAND_COLOR,
146+
color: '#000',
147+
}}
148+
onMouseEnter={e => {
149+
e.currentTarget.style.backgroundColor = '#8ae63a';
150+
}}
151+
onMouseLeave={e => {
152+
e.currentTarget.style.backgroundColor = BRAND_COLOR;
153+
}}
154+
>
155+
Got it, let's explore!
156+
</button>
157+
</div>
158+
</DialogContent>
159+
</Dialog>
160+
);
161+
};
162+
163+
export default DevelopmentStatusModal;

components/auth/login-form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function LoginForm({ onSuccess, onError }: LoginFormProps) {
3636
const onSubmit = async (data: LoginFormData) => {
3737
try {
3838
setIsLoading(true);
39-
console.log('Attempting login for:', data.email);
39+
// console.log('Attempting login for:', data.email);
4040

4141
const { error } = await authClient.signIn.email(
4242
{
@@ -46,7 +46,7 @@ export function LoginForm({ onSuccess, onError }: LoginFormProps) {
4646
},
4747
{
4848
onSuccess: () => {
49-
console.log('Login successful');
49+
// console.log('Login successful');
5050
toast.success('Login successful!');
5151
onSuccess?.();
5252
},

components/hackathons/participants/participantAvatar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ export function ParticipantAvatar({ participant }: ParticipantAvatarProps) {
5252
</div>
5353

5454
<span className='text-sm text-gray-200 transition-colors group-hover:text-[#a7f950]'>
55-
{participant.username}
55+
{participant.username.slice(0, 1).toUpperCase() +
56+
participant.username.slice(1)}
5657
</span>
5758
</div>
5859
</TooltipTrigger>

0 commit comments

Comments
 (0)