Skip to content

Commit

Permalink
ticket_180
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhuvnesh Sharma authored and Bhuvnesh Sharma committed Oct 5, 2024
1 parent b9ae851 commit 67759ba
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 11 deletions.
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ API_URL=http://djangoindia-backend:8000/api/v1
# Client-side URL (prefixed with NEXT_PUBLIC_)
NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1
NEXT_PUBLIC_FRONTEND_URL=http://localhost:3000
NEXT_PUBLIC_NODE_ENV=development
NEXT_PUBLIC_NODE_ENV=development

COMMUNITY_PARTNER_FORM =
SPONSOR_FORM =
EVENT_VOLUNTEER_FORM =
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const REGISTER_FORM_FIELDS: (FieldType | Array<FieldType>)[] = [
[
{
name: 'include_in_attendee_list',
label: 'I would like to be included in the attendee list',
label: `I would like to be included in the attendee's list`,
placeholder: '',
type: 'checkbox',
},
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/containers/RegisterEvent/RegisterEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const RegisterEvent = ({ eventId, seats_left, registration_end_date }: {
{...rest}
>
<form
className='sm:w-2/4 w-5/6 flex flex-col mx-auto gap-6 mt-10 h-full' // Added h-full and overflow-y-auto
className='sm:w-2/4 w-5/6 flex flex-col mx-auto gap-6 mt-10 h-full'
onSubmit={handleSubmit(onSubmit)}
>
{REGISTER_FORM_FIELDS.map((item, i) =>
Expand All @@ -146,11 +146,11 @@ export const RegisterEvent = ({ eventId, seats_left, registration_end_date }: {
render={({ field }) => (
<FormItem>
{type === 'checkbox' ? (
<div className='flex items-center gap-2'>
<FormLabel>{label}</FormLabel>
<div className='flex items-center gap-0'>
<FormControl>
<Input type='checkbox' onChange={field.onChange} />
</FormControl>
<FormLabel className='mb-0'>{label}</FormLabel>
</div>
):(
<>
Expand Down
27 changes: 25 additions & 2 deletions frontend/src/sections/CommunityPartners/CommunityPartners.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
'use client';
import React from 'react';
import Image from 'next/image';
import { Button } from '@components'
import Link from 'next/link';
import { FaArrowRight } from "react-icons/fa";

type Partner = {
name?: string;
Expand All @@ -16,15 +19,35 @@ const CommunityPartners: React.FC<CommunityPartnersProps> = ({ partners = [] })
if (partners.length === 0) {
return (
<div className='flex flex-col items-left justify-left py-10'>
<h4 className='text-2xl font-bold'>Community Partners</h4>
<div className='flex items-center'>
<h4 className='text-2xl font-bold'>Community Partners</h4>
<Link href={process.env.COMMUNITY_PARTNER_FORM || '#'} target='_blank' passHref>
<Button className='ml-2 group transition-all linear overflow-hidden'>
<span className='w-0 group-hover:w-auto overflow-hidden whitespace-nowrap transition-all linear'>
Become a community partner
</span>
<FaArrowRight className='ml-0 group-hover:ml-2 transition-all linear' />
</Button>
</Link>
</div>
<p className='text-gray-500 mt-4'>No community partners are available at the moment.</p>
</div>
);
}

return (
<div className='flex flex-col gap-6 py-10'>
<h4 className='text-2xl font-bold flex items-center'>Community Partners</h4>
<div className='flex items-center'>
<h4 className='text-2xl font-bold'>Community Partners</h4>
<Link href={process.env.COMMUNITY_PARTNER_FORM || '#'} target='_blank' passHref>
<Button className='ml-2 group transition-all linear overflow-hidden'>
<span className='w-0 group-hover:w-auto overflow-hidden whitespace-nowrap transition-all linear'>
Become a community partner
</span>
<FaArrowRight className='ml-0 group-hover:ml-2 transition-all linear' />
</Button>
</Link>
</div>
<p className='font-medium text-gray-700'>
We are proud to collaborate with our community partners who share our vision of making Django famous in India.
</p>
Expand Down
27 changes: 25 additions & 2 deletions frontend/src/sections/EventSponsors/EventSponsors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
import Image from 'next/image';
import React from 'react';
import splitAndCapitalize from '../../utils/formatKey'
import { Button } from '@components'
import Link from 'next/link';
import { FaArrowRight } from "react-icons/fa";

type SponsorDetails = {
name?: string;
Expand Down Expand Up @@ -83,7 +86,17 @@ const EventSponsors: React.FC<EventSponsorsProps> = ({ sponsors = [] }) => {
if (sponsors.length === 0) {
return (
<div className='flex flex-col items-left justify-left py-10'>
<h4 className='text-2xl font-bold'>Event Sponsors</h4>
<div className='flex items-center'>
<h4 className='text-2xl font-bold'>Event Sponsors</h4>
<Link href={process.env.SPONSOR_FORM || '#'} target='_blank' passHref>
<Button className='ml-2 group transition-all linear overflow-hidden'>
<span className='w-0 group-hover:w-auto overflow-hidden whitespace-nowrap transition-all linear'>
Become a sponsor
</span>
<FaArrowRight className='ml-0 group-hover:ml-2 transition-all linear' />
</Button>
</Link>
</div>
<p className='text-gray-500 mt-4'>No sponsors are available at the moment.</p>
</div>
);
Expand Down Expand Up @@ -114,7 +127,17 @@ const EventSponsors: React.FC<EventSponsorsProps> = ({ sponsors = [] }) => {

return (
<div className='flex flex-col gap-6 py-10'>
<h4 className='text-2xl font-bold flex items-center'>Event Sponsors</h4>
<div className='flex items-center'>
<h4 className='text-2xl font-bold'>Event Sponsors</h4>
<Link href={process.env.SPONSOR_FORM || '#'} target='_blank' passHref>
<Button className='ml-2 group transition-all linear overflow-hidden'>
<span className='w-0 group-hover:w-auto overflow-hidden whitespace-nowrap transition-all linear'>
Become a sponsor
</span>
<FaArrowRight className='ml-0 group-hover:ml-2 transition-all linear' />
</Button>
</Link>
</div>
<p className='font-medium'>
Support the Django India community and connect with a passionate, skilled audience. Join us in driving innovation and making an impact within the Django ecosystem.
</p>
Expand Down
27 changes: 25 additions & 2 deletions frontend/src/sections/EventVolunteers/EventVolunteers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import React from 'react';
import Image from 'next/image';
import { FaTwitter, FaLinkedin, FaEnvelope } from 'react-icons/fa';
import account from '../../../public/account.png'
import { Button } from '@components'
import Link from 'next/link';
import { FaArrowRight } from "react-icons/fa";

type Volunteer = {
name?: string;
Expand All @@ -21,15 +24,35 @@ const EventVolunteers: React.FC<EventVolunteersProps> = ({ volunteers = [] }) =>
if (volunteers.length === 0) {
return (
<div className='flex flex-col items-left justify-left py-10'>
<h4 className='text-2xl font-bold'>Event Volunteers</h4>
<div className='flex items-center'>
<h4 className='text-2xl font-bold'>Event Volunteers</h4>
<Link href={process.env.EVENT_VOLUNTEER_FORM || '#'} target='_blank' passHref>
<Button className='ml-2 group transition-all linear overflow-hidden'>
<span className='w-0 group-hover:w-auto overflow-hidden whitespace-nowrap transition-all linear'>
Become a volunteer
</span>
<FaArrowRight className='ml-0 group-hover:ml-2 transition-all linear' />
</Button>
</Link>
</div>
<p className='text-gray-500 mt-4'>No volunteers are available at the moment.</p>
</div>
);
}

return (
<div className='flex flex-col gap-8 py-10'>
<h4 className='text-2xl font-bold'>Event Volunteers</h4>
<div className='flex items-center'>
<h4 className='text-2xl font-bold'>Event Volunteers</h4>
<Link href={process.env.EVENT_VOLUNTEER_FORM || '#'} target='_blank' passHref>
<Button className='ml-2 group transition-all linear overflow-hidden'>
<span className='w-0 group-hover:w-auto overflow-hidden whitespace-nowrap transition-all linear'>
Become a volunteer
</span>
<FaArrowRight className='ml-0 group-hover:ml-2 transition-all linear' />
</Button>
</Link>
</div>
<p className='font-medium text-gray-700'>
Our volunteers are the heart of this event, working behind the scenes to make everything run seamlessly.
</p>
Expand Down

0 comments on commit 67759ba

Please sign in to comment.