feat: pyush

This commit is contained in:
Maulana Sodiqin
2025-11-30 22:43:09 +07:00
parent 6bbc87479a
commit 0c646ceb85
4 changed files with 103 additions and 22 deletions
+8 -1
View File
@@ -17,6 +17,9 @@ import { Icon } from '@iconify/react';
const DEFAULT_PER_PAGE = 12;
const PER_PAGE_OPTIONS = [6, 12, 24, 48];
// Team features deadline: 2025-11-30 23:59:00 WIB (UTC+7)
const TEAM_FEATURES_DEADLINE = new Date('2025-11-30T16:59:00Z');
// Member filter options
const MEMBER_FILTER_OPTIONS = [
{ label: 'All Teams', value: '', minMembers: undefined, maxMembers: undefined },
@@ -57,6 +60,9 @@ const BrowseTeamsPage: FC = (): ReactElement => {
const navigate = useNavigate();
const [searchParams, setSearchParams] = useSearchParams();
// Check if team features are closed
const isTeamFeaturesClosed = new Date() >= TEAM_FEATURES_DEADLINE;
// Initialize state from URL params
const initialPage = parseInt(searchParams.get('page') || '1', 10);
const initialPerPage = parseInt(
@@ -416,7 +422,8 @@ const BrowseTeamsPage: FC = (): ReactElement => {
<>
{myTeams.length === 0 &&
(team.member_count || 0) < 5 &&
!team.has_submission && (
!team.has_submission &&
!isTeamFeaturesClosed && (
<Button
className="w-full"
onClick={() => handleJoinRequest(team.id)}