From 98be844090af82c7367c89073152cc63d956305f Mon Sep 17 00:00:00 2001 From: David Oduneye Date: Sat, 27 Apr 2024 02:53:55 -0400 Subject: [PATCH] Squashed commit of the following: commit ebd35850db66e88454edbe014fc0004b1c4b6e03 Author: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> Date: Fri Apr 26 19:08:39 2024 -0400 chore: update swagger docs lol (#670) commit 5e577b5f4b1360e20f3ff07d37fadf774425652a Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Apr 26 18:55:57 2024 -0400 Chore(deps): Bump gorm.io/gorm from 1.25.9 to 1.25.10 in /backend (#651) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> commit dae85595613e4cfcca3facd8cbc7912088d117be Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Apr 26 18:53:57 2024 -0400 Chore(deps): Bump zod from 3.22.4 to 3.23.4 in /frontend/lib (#653) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> commit e783266eec56c6592f14a35e8dd1c934c21e1450 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Apr 26 18:53:34 2024 -0400 Chore(deps): Bump @react-native-menu/menu from 1.0.0 to 1.0.1 in /frontend/mobile (#654) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> commit 28b06015225df59651cb205a917af964713d9179 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Apr 26 18:53:13 2024 -0400 Chore(deps-dev): Bump react-test-renderer from 18.2.0 to 18.3.1 in /frontend/mobile (#655) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> commit 8fb976f12a58419fdd03571bd318c3844789b18b Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Apr 26 18:52:50 2024 -0400 Chore(deps): Bump zod from 3.22.4 to 3.23.4 in /frontend/mobile (#656) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> commit 91bd0faa854c0c1bb1ec8467998eaa017ad09178 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Apr 26 18:51:59 2024 -0400 Chore(deps): Bump react-native-svg from 15.1.0 to 15.2.0 in /frontend/mobile (#657) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> commit 1c3af86bf94b492b7f28609a9cbab3a6430f041d Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Apr 26 18:51:24 2024 -0400 Chore(deps): Bump react-native-screens from 3.30.1 to 3.31.1 in /frontend/mobile (#658) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> commit 438543c025ca1f1e440cf01dc3ca152c49ed2586 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Apr 26 18:51:00 2024 -0400 Chore(deps-dev): Bump eslint-config-next from 14.2.2 to 14.2.3 in /frontend/web (#659) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> commit d17a368d0ff607087ff55f66420282712a0cd93e Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Apr 26 18:50:31 2024 -0400 Chore(deps): Bump next from 14.2.2 to 14.2.3 in /frontend/web (#661) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> commit 0683f69d5968ecb7c81ed0f9db7c8feabfc5695d Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Apr 26 18:50:09 2024 -0400 Chore(deps): Bump zod from 3.23.3 to 3.23.4 in /frontend/dashboard (#663) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> commit b37cac22f80c897511a6a3fa35f8176e04305f9e Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Apr 26 18:49:46 2024 -0400 Chore(deps-dev): Bump eslint-config-next from 14.2.2 to 14.2.3 in /frontend/dashboard (#664) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> commit bc681d3bf9a75129a738cf28752298cbe28846d9 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Apr 26 18:49:22 2024 -0400 Chore(deps): Bump next from 14.2.2 to 14.2.3 in /frontend/dashboard (#666) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> commit 808fa7ae0fcc8fb80230e3dd5219a09128374d1e Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Apr 26 18:49:01 2024 -0400 Chore(deps): Bump github.com/aws/aws-sdk-go from 1.51.25 to 1.51.30 in /backend (#650) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> commit e8e385970701692c8a136d5ec8bf9ac8e18d21c4 Author: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> Date: Fri Apr 26 18:48:32 2024 -0400 feat: dashboard in cli (#665) commit 5ae64c23347fa0979b9cabee3f280b3fc6a1fd04 Author: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> Date: Fri Apr 26 18:45:51 2024 -0400 feat: fe lib ci (#652) commit 0eb16da561d20cab16d10ec976d66ea0f5e9e7c8 Author: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> Date: Fri Apr 26 17:30:51 2024 -0400 feat: register dashboard and lib with dependabot (#648) commit 5b38adcf75ddb5b4043a707d4e6fc6bed8d2e463 Author: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> Date: Fri Apr 26 17:28:51 2024 -0400 fix: misc fe pathing with drop of 'sac-' fe dir prefix (#646) commit e5561971006e10c9a9b5143d951225a40b7efeea Author: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> Date: Thu Apr 25 18:00:07 2024 -0400 chore: remove gorm in go structs (#641) commit a0ed6d4c2905085f3e4f202e458207d0629274cb Author: David Oduneye <44040421+DOOduneye@users.noreply.github.com> Date: Thu Apr 25 14:27:41 2024 -0400 feat: move authentication route to user, club authorization (#637) Co-authored-by: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> commit 25002d559ee424efd295a0813cfe74ac35203609 Author: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> Date: Thu Apr 25 14:25:58 2024 -0400 fix: frontend ci (#639) commit a28089a2f78a3a74a2b66c07bbfa3ad2e4f3ce5c Author: Alder Whiteford Date: Thu Apr 25 14:13:56 2024 -0400 feat: frontend lib, rtk migration, & dashboard init (#632) Co-authored-by: David Oduneye Co-authored-by: Alder Whiteford Co-authored-by: garrettladley --- .../_components/event-homepage-card.tsx | 1 - frontend/mobile/data/categories.ts | 16 ++++ frontend/mobile/data/clubs.ts | 60 ++++++++++++ frontend/mobile/data/events.ts | 92 +++++++++++++++++++ frontend/mobile/data/tags.ts | 13 +++ frontend/web/app/page.tsx | 12 +-- 6 files changed, 187 insertions(+), 7 deletions(-) create mode 100644 frontend/mobile/data/categories.ts create mode 100644 frontend/mobile/data/clubs.ts create mode 100644 frontend/mobile/data/events.ts create mode 100644 frontend/mobile/data/tags.ts 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 +}