Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
076ee4e
fix: improve timeline input , ui improvement and fixes for participat…
Benjtalkshow Mar 4, 2026
6a457cd
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Mar 4, 2026
f660875
fix: implement 2fa for email and password login
Benjtalkshow Mar 5, 2026
5460d20
fix: fix conflict
Benjtalkshow Mar 5, 2026
7b8308d
fix: fix conflict
Benjtalkshow Mar 5, 2026
31adf9f
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Mar 5, 2026
b6122c4
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Mar 5, 2026
7e57ddb
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Mar 5, 2026
156b0a8
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Mar 6, 2026
a6599eb
fix: fix submission form
Benjtalkshow Mar 6, 2026
f24e050
Merge branch 'main' of https://github.com/Benjtalkshow/boundless into…
Benjtalkshow Mar 6, 2026
222cd45
fix: fix hackathon submission and participant page
Benjtalkshow Mar 7, 2026
acad424
fix: fix hackathon submission and participant page
Benjtalkshow Mar 7, 2026
efda241
fix: fix auto refresh ib submission page
Benjtalkshow Mar 7, 2026
310a353
fix: fix conflict
Benjtalkshow Mar 7, 2026
dffd842
fix: hackathon submission fixes
Benjtalkshow Mar 8, 2026
a2ddd1d
fix: fix coderabbit corrections
Benjtalkshow Mar 9, 2026
08b85d2
fix: fix coderabbit corrections
Benjtalkshow Mar 9, 2026
fb3e148
chore: write boundless on x challenge blog
Benjtalkshow Mar 9, 2026
3408994
fix: remove blog
Benjtalkshow Mar 9, 2026
555ff6d
fix: fix conflict
Benjtalkshow Mar 9, 2026
8201463
fix: my project dashbaord count and extend hackathon deadline
Benjtalkshow Mar 10, 2026
cfd9d54
fix: my project dashbaord count and extend hackathon deadline
Benjtalkshow Mar 10, 2026
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
25 changes: 25 additions & 0 deletions app/me/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ interface MeLayoutProfile {
image?: string;
joinedHackathons?: ProfileItemWithId[];
hackathonSubmissionsAsParticipant?: ProfileItemWithId[];
projects?: ProfileItemWithId[];
};
image?: string;
hackathonSubmissionsAsParticipant?: ProfileItemWithId[];
projects?: ProfileItemWithId[];
stats?: {
projectsCreated?: number;
};
}

const getId = (item: ProfileItemWithId): string | undefined =>
Expand Down Expand Up @@ -69,6 +74,25 @@ const MeLayout = ({ children }: MeLayoutProps): React.ReactElement => {
}).length;
}, [typedProfile]);

const projectsCount = useMemo(() => {
if (!typedProfile) return 0;
// stats.projectsCreated is often the most direct count
if (typeof typedProfile.stats?.projectsCreated === 'number') {
return typedProfile.stats.projectsCreated;
}
// Fallback to array lengths
const fromUser = typedProfile.user?.projects ?? [];
const fromProfile = typedProfile.projects ?? [];
const merged = [...fromUser, ...fromProfile];
const seen = new Set<string>();
return merged.filter(p => {
const id = getId(p);
if (!id || seen.has(id)) return false;
seen.add(id);
return true;
}).length;
}, [typedProfile]);

// Only show full-screen spinner on first load, not on background refetches
if (isLoading && !hasLoadedOnce.current) {
return (
Expand All @@ -92,6 +116,7 @@ const MeLayout = ({ children }: MeLayoutProps): React.ReactElement => {
counts={{
participating: hackathonsCount,
submissions: submissionsCount,
projects: projectsCount,
}}
variant='inset'
/>
Expand Down
18 changes: 5 additions & 13 deletions components/app-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ import {
import Image from 'next/image';
import Link from 'next/link';
import { useNotificationStore } from '@/lib/stores/notification-store';
import { Logo } from './landing-page/navbar';

const getNavigationData = (counts?: {
participating?: number;
unreadNotifications?: number;
submissions?: number;
projects?: number;
}) => ({
main: [
{
Expand All @@ -57,7 +59,7 @@ const getNavigationData = (counts?: {
title: 'My Projects',
url: '/me/projects',
icon: IconFolder,
badge: '3',
badge: (counts?.projects ?? 0) > 0 ? String(counts?.projects) : undefined,
},
{
title: 'Create Project',
Expand Down Expand Up @@ -132,7 +134,7 @@ export function AppSidebar({
...props
}: {
user: UserData;
counts?: { participating?: number; submissions?: number };
counts?: { participating?: number; submissions?: number; projects?: number };
} & React.ComponentProps<typeof Sidebar>) {
const unreadNotifications = useNotificationStore(state => state.unreadCount);

Expand Down Expand Up @@ -164,17 +166,7 @@ export function AppSidebar({
size='lg'
className='group hover:bg-sidebar-accent/0 transition-all duration-200'
>
<Link href='/dashboard' className='flex items-center gap-3'>
<div className='flex items-center justify-center rounded-lg'>
<Image
width={24}
height={24}
className='h-auto w-4/5 object-contain'
src='/logo.svg'
alt='Boundless Logo'
/>
</div>
</Link>
<Logo />
</SidebarMenuButton>
</SidebarMenuItem>
</SidebarMenu>
Expand Down
2 changes: 1 addition & 1 deletion components/landing-page/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export function Navbar() {
);
}

function Logo() {
export function Logo() {
return (
<Link
href='/'
Expand Down
Loading