Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions .eslintrc.js

This file was deleted.

5 changes: 2 additions & 3 deletions app/(landing)/about/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { Metadata } from 'next';
import { generatePageMetadata } from '@/lib/metadata';
import Missionpage from '@/components/About-Mission/Missionpage';
Expand All @@ -9,7 +8,7 @@ import Timeline from '@/components/landing-page/about/timeline/Timeline';
import TestimonialsSection from '@/components/testimonials/TestimonialsSection';
import { testimonials } from '@/components/testimonials/data/testimonial';
import AboutUsHero2 from './AboutUsHero2';
import OurTeam from './OurTeam';
// import OurTeam from './OurTeam';
import Partners from './Partners';

export const metadata: Metadata = generatePageMetadata('about');
Expand All @@ -22,7 +21,7 @@ const AboutPage = () => {
<Missionpage />
<AboutUsDifferent />
<Timeline />
<OurTeam />
{/* <OurTeam /> */}
<Partners />
</div>
<TestimonialsSection testimonials={testimonials} />
Expand Down
2 changes: 1 addition & 1 deletion app/(landing)/hackathons/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { HackathonResources } from '@/components/hackathons/resources/resources'
import SubmissionTab from '@/components/hackathons/submissions/submissionTab';
import { HackathonDiscussions } from '@/components/hackathons/discussion/comment';
import { TeamFormationTab } from '@/components/hackathons/team-formation/TeamFormationTab';
import LoadingScreen from '@/components/landing-page/project/CreateProjectModal/LoadingScreen';
import LoadingScreen from '@/features/projects/components/CreateProjectModal/LoadingScreen';
import { useTimelineEvents } from '@/hooks/hackathon/use-timeline-events';
import { toast } from 'sonner';
import type { Participant } from '@/lib/api/hackathons';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ const AcceptTeamInvitationPage = () => {
}, 2000);
}
} catch (err: any) {
console.error('Failed to accept invitation:', err);

const errorMessage = err?.message || 'Failed to accept invitation';
setError(errorMessage);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { HackathonBanner } from '@/components/hackathons/hackathonBanner';
import { HackathonNavTabs } from '@/components/hackathons/hackathonNavTabs';
import { HackathonOverview } from '@/components/hackathons/overview/hackathonOverview';
import { HackathonResources } from '@/components/hackathons/resources/resources';
import LoadingScreen from '@/components/landing-page/project/CreateProjectModal/LoadingScreen';
import LoadingScreen from '@/features/projects/components/CreateProjectModal/LoadingScreen';
import { Badge } from '@/components/ui/badge';
import { BoundlessButton } from '@/components/buttons';
import type { Hackathon } from '@/lib/api/hackathons';
Expand Down
14 changes: 0 additions & 14 deletions app/(landing)/me/layout.tsx

This file was deleted.

8 changes: 4 additions & 4 deletions app/(landing)/notifications/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { useState } from 'react';
import { useNotifications } from '@/hooks/use-notifications';
import { useNotifications } from '@/hooks/useNotifications';
import { useNotificationPolling } from '@/hooks/use-notification-polling';
import { NotificationList } from '@/components/notifications/NotificationList';
import { Button } from '@/components/ui/button';
Expand Down Expand Up @@ -81,15 +81,15 @@ export default function NotificationsPage() {
<div className='mb-6 flex items-center justify-between'>
<div>
<h1 className='text-3xl font-bold text-white'>Notifications</h1>
<p className='mt-1 text-sm text-zinc-400'>
<div className='mt-1 text-sm text-zinc-400'>
{loading ? (
<Skeleton className='h-4 w-48' />
) : (
<>
{unreadCount} unread of {total} total
</>
)}
</p>
</div>
</div>
{unreadCount > 0 && !loading && (
<Button
Expand All @@ -107,7 +107,7 @@ export default function NotificationsPage() {
loading={loading}
onNotificationClick={notification => {
if (!notification.read) {
markNotificationAsRead([notification._id]).catch(() => {
markNotificationAsRead([notification.id]).catch(() => {
// Silently handle error - user feedback already provided
});
}
Expand Down
8 changes: 4 additions & 4 deletions app/(landing)/organizations/[id]/hackathons/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function HackathonsPage() {
organizationId,
autoFetch: true,
});
console.log('hackathons', hackathons);

// Use the separate delete hook
const { isDeleting, deleteHackathon } = useDeleteHackathon({
organizationId,
Expand All @@ -119,7 +119,7 @@ export default function HackathonsPage() {
type: 'draft' | 'hackathon';
data: HackathonDraft | Hackathon;
}> = [];
console.log({ drafts });

drafts.forEach(draft => {
if (statusFilter === 'all' || statusFilter === 'draft') {
items.push({ type: 'draft', data: draft });
Expand Down Expand Up @@ -199,8 +199,8 @@ export default function HackathonsPage() {

try {
await deleteHackathon();
} catch (error) {
console.error(error);
} catch {
// Error handled by toast in deleteHackathon hook
} finally {
setHackathonToDelete(null);
}
Expand Down
2 changes: 1 addition & 1 deletion app/(landing)/profile/[username]/profile-data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useEffect, useState } from 'react';
import { getUserProfileByUsername } from '@/lib/api/auth';
import { PublicUserProfile } from '@/types/project';
import { PublicUserProfile } from '@/features/projects/types';
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
import ActivityTab from '@/components/profile/ActivityTab';
import {
Expand Down
92 changes: 92 additions & 0 deletions app/(landing)/projects/[slug]/contributions/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
'use client';

import { use, useEffect, useState } from 'react';
import { getCrowdfundingProject } from '@/features/projects/api';
import type { Crowdfunding } from '@/features/projects/types';
import { ContributionsDataTable } from '@/features/projects/components/Contributions/ContributionsDataTable';
import { ArrowLeft } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { useRouter } from 'next/navigation';

interface ContributionsPageProps {
params: Promise<{
slug: string;
}>;
}

export default function ContributionsPage({ params }: ContributionsPageProps) {
const router = useRouter();
const resolvedParams = use(params);
const slug = resolvedParams.slug;

const [project, setProject] = useState<Crowdfunding | null>(null);
const [loading, setLoading] = useState(true);

useEffect(() => {
const fetchProject = async () => {
try {
setLoading(true);
const data = await getCrowdfundingProject(slug);
setProject(data);
} catch {
// Error handled by UI state
} finally {
setLoading(false);
}
};

fetchProject();
}, [slug]);

return (
<div className='bg-background-main-bg mx-auto flex min-h-screen max-w-[1440px] flex-col px-5 py-8 md:px-[50px] lg:px-[100px]'>
{/* Header */}
<div className='mb-8 space-y-4'>
<Button
variant='ghost'
onClick={() => router.back()}
className='-ml-2 text-[#B5B5B5] hover:bg-[#1A1A1A] hover:text-white'
>
<ArrowLeft className='mr-2 h-4 w-4' />
Back
</Button>

<div className='space-y-2'>
<h1 className='text-3xl font-bold text-white'>Contributions</h1>
{project && (
<div className='flex items-center gap-3'>
<p className='text-[#B5B5B5]'>
Project:{' '}
<span className='font-medium text-white'>
{project.project.title}
</span>
</p>
<span className='text-gray-800'>•</span>
<p className='text-[#B5B5B5]'>
{project.contributors.length}{' '}
{project.contributors.length === 1
? 'Contributor'
: 'Contributors'}
</p>
</div>
)}
</div>
</div>

{/* Table */}
<div className='flex-1'>
{loading ? (
<div className='flex items-center justify-center py-20'>
<div className='border-primary h-12 w-12 animate-spin rounded-full border-4 border-t-transparent' />
</div>
) : project ? (
<ContributionsDataTable data={project.contributors} loading={false} />
) : (
<div className='flex items-center justify-center py-20'>
<p className='text-gray-600'>Failed to load contributions</p>
</div>
)}
</div>
</div>
);
}
Loading
Loading