diff --git a/frontend/mobile/app/(app)/(tabs)/_components/event-homepage-card.tsx b/frontend/mobile/app/(app)/(tabs)/_components/event-homepage-card.tsx index 185c89393..48638381d 100644 --- a/frontend/mobile/app/(app)/(tabs)/_components/event-homepage-card.tsx +++ b/frontend/mobile/app/(app)/(tabs)/_components/event-homepage-card.tsx @@ -8,7 +8,6 @@ import { UseQueryResult } from '@tanstack/react-query'; import BluePin from '@/assets/images/svg/blue-pin.svg'; import Pin from '@/assets/images/svg/pin.svg'; -// import { useClub } from '@/hooks/use-club'; import { useEventTags } from '@/hooks/use-event'; import { isToday, randomEventColorData } from '@/lib/utils'; import { Event } from '@/types/event'; diff --git a/frontend/mobile/data/categories.ts b/frontend/mobile/data/categories.ts new file mode 100644 index 000000000..bba81d015 --- /dev/null +++ b/frontend/mobile/data/categories.ts @@ -0,0 +1,16 @@ +import { Category } from '@/types/category'; + +import { tags } from './tags'; + +export const categories: Category[] = []; + +for (let i = 1; i <= 10; i++) { + const category: Category = { + id: i.toString(), + created_at: new Date(), + updated_at: new Date(), + name: `Tag${i}`, + tags: tags.slice(0, Math.floor(Math.random() * tags.length)) + }; + categories.push(category); +} diff --git a/frontend/mobile/data/clubs.ts b/frontend/mobile/data/clubs.ts new file mode 100644 index 000000000..bf565603d --- /dev/null +++ b/frontend/mobile/data/clubs.ts @@ -0,0 +1,60 @@ +import { Club } from '@/types/club'; +import { Contact } from '@/types/contact'; + +export const clubs: Club[] = []; + +for (let i = 1; i <= 10; i++) { + const club: Club = { + id: i.toString(), + updated_at: new Date(), + created_at: new Date(), + name: `Club ${i}`, + preview: `Preview ${i}`, + description: `Description ${i}`, + num_members: i * 10, + is_recruiting: i % 2 === 0, + recruitment_cycle: + i % 4 === 0 + ? 'always' + : i % 3 === 0 + ? 'fallSpring' + : i % 2 === 0 + ? 'spring' + : 'fall', + recruitment_type: + i % 3 === 0 + ? 'unrestricted' + : i % 2 === 0 + ? 'tryout' + : 'application', + application_link: `https://example.com/club${i}`, + logo: `https://example.com/club${i}.png` + }; + clubs.push(club); +} + +export const contacts: Contact[] = []; + +for (let i = 1; i <= 10; i++) { + const contact: Contact = { + id: i.toString(), + created_at: new Date(), + updated_at: new Date(), + content: `Contact ${i}`, + type: Math.random() > 0.5 ? 'email' : 'slack' + }; + contacts.push(contact); +} + +export const clubContacts: { [key: string]: Contact[] } = {}; + +for (let i = 1; i <= 10; i++) { + const clubContactsArray: Contact[] = []; + const contactIndices: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].filter( + (index) => index % i === 0 + ); + contactIndices.slice(0, 2).forEach((index) => { + clubContactsArray.push(contacts[index]); + }); + clubContacts[i.toString()] = clubContactsArray; +} diff --git a/frontend/mobile/data/events.ts b/frontend/mobile/data/events.ts new file mode 100644 index 000000000..ea6533685 --- /dev/null +++ b/frontend/mobile/data/events.ts @@ -0,0 +1,92 @@ +import { Club } from '@/types/club'; +import { Event } from '@/types/event'; +import { Tag } from '@/types/tag'; + +import { clubs } from './clubs'; +import { tags } from './tags'; + +const Locations = [ + '2435 E. North St., Greenville, SC', + '1234 Main Rd., New York, NY', + '5678 Elm St., Los Angeles, CA', + '91011 Pine Ct., Chicago, IL', + '1213 Oak Ave., Houston, TX', + '1415 Maple Dr., Phoenix, AZ', + '1617 Birch Ln., Philadelphia, PA', + '1819 Cedar Rd., San Antonio, TX', + '2021 Spruce St., San Diego, CA', + '2223 Willow Dr., Dallas, TX' +]; + +const generateLoremIpsum = (paragraphs = 1, sentencesPerParagraph = 3) => { + const loremIpsumText = + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'; + const sentences = loremIpsumText.split('. '); + + const getRandomSentence = () => { + return sentences[Math.floor(Math.random() * sentences.length)]; + }; + + let paragraphsText = ''; + for (let i = 0; i < paragraphs; i++) { + let paragraph = ''; + for (let j = 0; j < sentencesPerParagraph; j++) { + paragraph += getRandomSentence() + ' '; + } + paragraphsText += paragraph.trim() + '\n\n'; + } + + return paragraphsText.trim(); +}; + +export const events: Event[] = []; + +for (let i = 1; i <= 10; i++) { + events.push({ + id: i.toString(), + updated_at: new Date(), + created_at: new Date(), + name: `Event ${i}`, + start_time: new Date(), + end_time: new Date(), + location: Locations[i - 1], + preview: `Preview ${i}`, + content: generateLoremIpsum( + Math.floor(Math.random() * 3) + 1, + Math.floor(Math.random() * 3) + 1 + ), + meeting_link: `http://www.example.com/event${i}`, + is_recurring: false, + event_type: 'open' + }); +} + +// Event Hosts + +export const eventHosts: { [key: string]: Club[] } = {}; + +for (let i = 1; i <= 10; i++) { + const hostsArray: Club[] = []; + const hostIndices: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].filter( + (index) => index % i === 0 + ); + hostIndices.forEach((index) => { + hostsArray.push(clubs[index]); + }); + eventHosts[i.toString()] = hostsArray; +} + +// Event Tags + +export const eventTags: { [key: string]: Tag[] } = {}; + +for (let i = 1; i <= 10; i++) { + const tagsArray: Tag[] = []; + const tagIndices: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].filter( + (index) => index % i === 0 + ); + tagIndices.forEach((index) => { + tagsArray.push(tags[index]); + }); + eventTags[i.toString()] = tagsArray; +} diff --git a/frontend/mobile/data/tags.ts b/frontend/mobile/data/tags.ts new file mode 100644 index 000000000..045b20667 --- /dev/null +++ b/frontend/mobile/data/tags.ts @@ -0,0 +1,13 @@ +import { Tag } from '@/types/tag'; + +export const tags: Tag[] = []; + +for (let i = 1; i <= 10; i++) { + const tag: Tag = { + id: i.toString(), + created_at: new Date(), + updated_at: new Date(), + name: `Tag${i}` + }; + tags.push(tag); +} diff --git a/frontend/web/app/page.tsx b/frontend/web/app/page.tsx index f2e703b29..94c3b7eb8 100644 --- a/frontend/web/app/page.tsx +++ b/frontend/web/app/page.tsx @@ -15,7 +15,7 @@ export default function Home() { target="_blank" rel="noopener noreferrer" > - By{' '} + By{" "} Vercel Logo

- Docs{' '} + Docs{" "} -> @@ -65,7 +65,7 @@ export default function Home() { rel="noopener noreferrer" >

- Learn{' '} + Learn{" "} -> @@ -83,7 +83,7 @@ export default function Home() { rel="noopener noreferrer" >

- Templates{' '} + Templates{" "} -> @@ -100,7 +100,7 @@ export default function Home() { rel="noopener noreferrer" >

- Deploy{' '} + Deploy{" "} -> @@ -113,4 +113,4 @@ export default function Home() { ); -} \ No newline at end of file +}