From 0b0d7c89613a907f9de5c38668328b88e54eb195 Mon Sep 17 00:00:00 2001 From: m20arcusk Date: Mon, 13 Jan 2025 16:56:36 -0800 Subject: [PATCH 1/4] updating some breakpoints to preserve company pfp structure --- .../companion/blueprintProfiles/extraInfo.tsx | 2 +- .../companion/blueprintProfiles/profileHeader.tsx | 2 +- .../companion/profile-temp/[externalUserId]/index.tsx | 10 +++++----- .../companion/profile/company/[companyId]/index.tsx | 1 - src/styles/globals.css | 1 - tailwind.config.ts | 2 +- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/components/companion/blueprintProfiles/extraInfo.tsx b/src/components/companion/blueprintProfiles/extraInfo.tsx index da3e86b..8e9d97b 100644 --- a/src/components/companion/blueprintProfiles/extraInfo.tsx +++ b/src/components/companion/blueprintProfiles/extraInfo.tsx @@ -30,7 +30,7 @@ const ExtraInfo: FC<{ userData: UserProfile }> = ({ userData }) => { linkedin-logo
LINKEDIN - + {userData.linkedIn}
diff --git a/src/components/companion/blueprintProfiles/profileHeader.tsx b/src/components/companion/blueprintProfiles/profileHeader.tsx index d073618..263abef 100644 --- a/src/components/companion/blueprintProfiles/profileHeader.tsx +++ b/src/components/companion/blueprintProfiles/profileHeader.tsx @@ -17,7 +17,7 @@ const Profile: FC = ({ userData }) => { {`${userData.name}'s ) : (
diff --git a/src/pages/companion/profile-temp/[externalUserId]/index.tsx b/src/pages/companion/profile-temp/[externalUserId]/index.tsx index a16cab8..50c873c 100644 --- a/src/pages/companion/profile-temp/[externalUserId]/index.tsx +++ b/src/pages/companion/profile-temp/[externalUserId]/index.tsx @@ -11,7 +11,6 @@ import { UserProfile } from "@/types"; const UserProfilePage = () => { const [userData, setUserData] = useState(null); const [isLoading, setIsLoading] = useState(true); - const [isSideNavOpen, setIsSideNavOpen] = useState(false); const router = useRouter(); const [user, setUser] = useState(null); @@ -129,11 +128,11 @@ const data2: UserProfile = { role: "Delegate", company: "Tesla", hobby: "Basketball", - linkedIn: "linkedin.com/in/daniellee", + linkedIn: "linkedin.com/in/siredwardgregoriothethird", profilePicUrl: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTe8Qr5TK-ehPu0lZsZxhmTM1eGAdMVgApwSzYSKFOeQPGbukpuICsAwLQMKQJeuDpgpLU&usqp=CAU", - companyLogoUrl: "https://static.vecteezy.com/system/resources/previews/020/336/735/non_2x/tesla-logo-tesla-icon-transparent-png-free-vector.jpg", + companyLogoUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACoCAMAAABt9SM9AAAAh1BMVEUAAAD///8FBQUNDQ0QEBAEBAQJCQkODg4TExNNTU0VFRWYmJhgYGAYGBjR0dG8vLwgICBAQEBmZmby8vJSUlJeXl7Dw8NISEjZ2dm2trZZWVlsbGw4ODjf39/Ozs6srKyBgYF6enrq6uopKSmdnZ2EhISQkJAwMDClpaVycnJ7e3ssLCw0NDSdsgZAAAAGB0lEQVR4nO3c6XKqShQF4M3YDQiiKE6IOEY9ef/nu7tBFDQOSdWN595e35+kRatwVc+ARAAAAAAAAAAAAAAAAAAAAAAAAP9VTslUqn/ffUJ/IYdOCbnMKrknp9zefYZ/DRWUykjYtgwVP6z4UgohODgVGGkfGOekYuKUfGmb55cb/1nS58xsW3Al07mGqQrF1Ymj4AzE2is2k3SeGLVklXcXwdJbC5NcmyOzLRXYu8/6HcqWZ3MARGtvN4kuId1Ixt3d9EOSJavA9KpfqvGpKiWIsv5i/CCnhvFkOXKJaxjnpU/9KqOSIVepQfCoQn1hvujHZPlS6BMXd9o20XA/v2ptq3E62e+Kw6zTGQ47s+U2WKTR/CrOpHuQ5EtLk7Qc1ydvv2rVmHSznPb+xLbpxyEPfXY5iYhDV4brbHDYpK1ck4VHUugRlikobTWtWRbzeGhlfR4OpyotaQshOavRZL+djWIiGWeHRTOwfN2YaPyfmTaN6y8d7T5IhL3lPq9b29T0hZq5C2llp9eS8WTrxT79KdL6XatYahKWsGdVUtuMwtE2bbXIJHNtnrG7worbbS8PBjGtj1VeAWk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kwdplH5rtqg/KD6/FCHCxqdxjPQa/XC5aHomSpenjec26qcGv3Gpy/PuU7ecO6/b7oJdnNjEgRBmRWFu6AyLYs9Y1UVt9Xbu0an+elD0Dqqg4kxuHeoZ0St8lVYGpoY0/rfOJ10K+lRlXtGUpc/VLkd1rY7OQl++ZTfpxHW5ddnkp4qNp6RLsvtsC4/ZDD+3TN+o2ZYNNgWRbHdHmVZsr1RKUu/CqtrbI5FcVxudQ3r7ntOYTXfWpcyPcOKo9q4KF8YpFGeR1Ge1GGN8+rwkC71rKdRWIvGaHh+Jnpczj6nN33WSW6XpWH5IZ3C+hzISyHzKqfSwKvJ5lHvdDQs/9pe73fPGAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBf9A+2Fk48FnVN4gAAAABJRU5ErkJggg==", funFacts: [ - "Has visited 23 countries around the world even though I've never flown first class.", + "Has visited 23 countries around the world even though I've never flown first class. Has visited 23 countries around the world even though I've never flown first class.", "Can speak 3 languages", "Former competitive swimmer", ], @@ -146,5 +145,6 @@ const data2: UserProfile = { }; async function getUserProfile(user: string) { - return data2; + const data = user=="daniel"? data1 : data2; + return data; } \ No newline at end of file diff --git a/src/pages/companion/profile/company/[companyId]/index.tsx b/src/pages/companion/profile/company/[companyId]/index.tsx index 749a4ac..ffe8599 100644 --- a/src/pages/companion/profile/company/[companyId]/index.tsx +++ b/src/pages/companion/profile/company/[companyId]/index.tsx @@ -20,7 +20,6 @@ interface CompanyProfile { export default function CompanyPage() { const [userData, setUserData] = useState(null); const [isLoading, setIsLoading] = useState(true); - const [isSideNavOpen, setIsSideNavOpen] = useState(false); const [companyId, setCompanyId] = useState(undefined); diff --git a/src/styles/globals.css b/src/styles/globals.css index 4c4be03..70141d5 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -1,5 +1,4 @@ @import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); -@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Mono:wght@400;500;700&display=swap'); @tailwind base; @tailwind components; @tailwind utilities; diff --git a/tailwind.config.ts b/tailwind.config.ts index 57c70a2..2dd8dbe 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -120,7 +120,7 @@ const config: Config = { }, extend: { screens: { - 'xs': '370px', + 'xs': '412px', // originally 370 'mxs': '445px' // medium xs (could prob rename) }, backgroundImage: { From 9b08fd8be83a8d692298e83fd300e735c11d450c Mon Sep 17 00:00:00 2001 From: m20arcusk Date: Mon, 13 Jan 2025 17:07:39 -0800 Subject: [PATCH 2/4] minor changes --- src/pages/companion/profile-temp/[externalUserId]/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/companion/profile-temp/[externalUserId]/index.tsx b/src/pages/companion/profile-temp/[externalUserId]/index.tsx index 50c873c..9d48611 100644 --- a/src/pages/companion/profile-temp/[externalUserId]/index.tsx +++ b/src/pages/companion/profile-temp/[externalUserId]/index.tsx @@ -128,11 +128,11 @@ const data2: UserProfile = { role: "Delegate", company: "Tesla", hobby: "Basketball", - linkedIn: "linkedin.com/in/siredwardgregoriothethird", + linkedIn: "linkedin.com/in/danielthegoatlee", profilePicUrl: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTe8Qr5TK-ehPu0lZsZxhmTM1eGAdMVgApwSzYSKFOeQPGbukpuICsAwLQMKQJeuDpgpLU&usqp=CAU", - companyLogoUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACoCAMAAABt9SM9AAAAh1BMVEUAAAD///8FBQUNDQ0QEBAEBAQJCQkODg4TExNNTU0VFRWYmJhgYGAYGBjR0dG8vLwgICBAQEBmZmby8vJSUlJeXl7Dw8NISEjZ2dm2trZZWVlsbGw4ODjf39/Ozs6srKyBgY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LogoUrl: "https://static.vecteezy.com/system/resources/previews/020/336/735/non_2x/tesla-logo-tesla-icon-transparent-png-free-vector.jpg", funFacts: [ - "Has visited 23 countries around the world even though I've never flown first class. Has visited 23 countries around the world even though I've never flown first class.", + "Has visited 23 countries around the world even though I've never flown first class.", "Can speak 3 languages", "Former competitive swimmer", ], From bcea3b7519708947b6e42a0621655391069cc257 Mon Sep 17 00:00:00 2001 From: m20arcusk Date: Wed, 15 Jan 2025 18:43:19 -0800 Subject: [PATCH 3/4] updated fun facts to have proper header naming and profile name centering. --- .../companion/blueprintProfiles/extraInfo.tsx | 24 +++++++++++++++---- .../blueprintProfiles/profileHeader.tsx | 2 +- .../profile-temp/[externalUserId]/index.tsx | 6 ++--- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/components/companion/blueprintProfiles/extraInfo.tsx b/src/components/companion/blueprintProfiles/extraInfo.tsx index 8e9d97b..3db63f6 100644 --- a/src/components/companion/blueprintProfiles/extraInfo.tsx +++ b/src/components/companion/blueprintProfiles/extraInfo.tsx @@ -10,12 +10,12 @@ const ExtraInfo: FC<{ userData: UserProfile }> = ({ userData }) => { if (typeof window !== 'undefined') { // Normalize the LinkedIn URL let linkedInUrl = userData.linkedIn.trim(); - + // Ensure the URL starts with "https://" if (!/^https?:\/\//i.test(linkedInUrl)) { linkedInUrl = "https://" + linkedInUrl; } - + // Redirect to the normalized URL window.location.href = linkedInUrl; } @@ -49,7 +49,23 @@ const ExtraInfo: FC<{ userData: UserProfile }> = ({ userData }) => { {/* Fun Facts */}
- + {userData?.funFacts[0] && ( +
+

+ ISLAND COMPANION +

+

{userData.funFacts[0]}

+
+ )} + {userData?.funFacts[1] && ( +
+

+ INVENTION FOR ALIENS +

+

{userData.funFacts[1]}

+
+ )} + {/* FUN FACTS ABOUT {userData.name.split(' ')[0].toUpperCase()}
    @@ -58,7 +74,7 @@ const ExtraInfo: FC<{ userData: UserProfile }> = ({ userData }) => { {fact} ))} -
+ */}
diff --git a/src/components/companion/blueprintProfiles/profileHeader.tsx b/src/components/companion/blueprintProfiles/profileHeader.tsx index 263abef..4917b29 100644 --- a/src/components/companion/blueprintProfiles/profileHeader.tsx +++ b/src/components/companion/blueprintProfiles/profileHeader.tsx @@ -24,7 +24,7 @@ const Profile: FC = ({ userData }) => { {userData.name.split(' ').map((n: string) => n[0]).join('')}
)} -
{userData.name}
+
{userData.name}

{userData.role}

); diff --git a/src/pages/companion/profile-temp/[externalUserId]/index.tsx b/src/pages/companion/profile-temp/[externalUserId]/index.tsx index 9d48611..3cc0ece 100644 --- a/src/pages/companion/profile-temp/[externalUserId]/index.tsx +++ b/src/pages/companion/profile-temp/[externalUserId]/index.tsx @@ -108,10 +108,8 @@ const data1: UserProfile = { linkedIn: `linkedin.com/in/daniellee`, profilePicUrl: "https://hoopshype.com/wp-content/uploads/sites/92/2024/11/i_7b_e3_c7_lebron-james.png?w=1000&h=600&crop=1", funFacts: [ - "Has visited 23 countries", - "Can speak 3 languages", - "Former competitive swimmer", - + "Steve Jobs", + "Clap on clap off lights" ], interests: [ "UX/UI Design", From 733f470c8b3548360119624e949305d4e20273fa Mon Sep 17 00:00:00 2001 From: m20arcusk Date: Thu, 16 Jan 2025 20:29:33 -0800 Subject: [PATCH 4/4] updated profile to match form, fixed edge case on pfp, removed animation on nav --- .../companion/blueprintProfiles/extraInfo.tsx | 59 ++++-------------- .../blueprintProfiles/profileHeader.tsx | 19 +++--- .../blueprintProfiles/responseSection.tsx | 33 ++++++++++ .../companion/navigation/top-nav.tsx | 3 +- .../profile-temp/[externalUserId]/index.tsx | 60 ++++++++++--------- .../profile/company/[companyId]/index.tsx | 8 +-- src/types.ts | 3 +- 7 files changed, 90 insertions(+), 95 deletions(-) create mode 100644 src/components/companion/blueprintProfiles/responseSection.tsx diff --git a/src/components/companion/blueprintProfiles/extraInfo.tsx b/src/components/companion/blueprintProfiles/extraInfo.tsx index 3db63f6..e156120 100644 --- a/src/components/companion/blueprintProfiles/extraInfo.tsx +++ b/src/components/companion/blueprintProfiles/extraInfo.tsx @@ -3,6 +3,7 @@ import AdditionalLinks from './additionalLinks'; import { CompanionButton } from '../../ui/companion-button'; import { AnimatedBorder } from '../../ui/animated-border'; import { UserProfile } from '@/types'; +import ResponseSection from './responseSection'; const ExtraInfo: FC<{ userData: UserProfile }> = ({ userData }) => { @@ -44,54 +45,18 @@ const ExtraInfo: FC<{ userData: UserProfile }> = ({ userData }) => { - {/* Fun Facts and Interests Grid */} -
- {/* Fun Facts */} - -
- {userData?.funFacts[0] && ( -
-

- ISLAND COMPANION -

-

{userData.funFacts[0]}

-
- )} - {userData?.funFacts[1] && ( -
-

- INVENTION FOR ALIENS -

-

{userData.funFacts[1]}

-
- )} - {/* - FUN FACTS ABOUT {userData.name.split(' ')[0].toUpperCase()} - -
    - {userData.funFacts.map((fact, index) => ( -
  • - {fact} -
  • - ))} -
*/} -
-
+ {/* Interests */} + {userData.interests && ( + + )} - {/* Interests */} - -
- INTERESTS -
    - {userData.interests.map((interest, index) => ( -
  • - {interest} -
  • - ))} -
-
-
-
+ {userData.responseList && userData.responseList[1] && ( + + )} + + {userData.responseList && userData.responseList[2] && ( + + )} diff --git a/src/components/companion/blueprintProfiles/profileHeader.tsx b/src/components/companion/blueprintProfiles/profileHeader.tsx index 4917b29..e9eb989 100644 --- a/src/components/companion/blueprintProfiles/profileHeader.tsx +++ b/src/components/companion/blueprintProfiles/profileHeader.tsx @@ -1,4 +1,6 @@ import { FC } from 'react'; +import { Avatar } from "@/components/ui/avatar"; +import { AvatarFallback, AvatarImage } from "@radix-ui/react-avatar"; interface UserProfile { name: string; @@ -13,17 +15,12 @@ interface ProfileProps { const Profile: FC = ({ userData }) => { return (
- {userData?.profilePicUrl ? ( - {`${userData.name}'s - ) : ( -
- {userData.name.split(' ').map((n: string) => n[0]).join('')} -
- )} + + + {userData.name.split(' ').map((n: string) => n[0]).join('')} +
{userData.name}

{userData.role}

diff --git a/src/components/companion/blueprintProfiles/responseSection.tsx b/src/components/companion/blueprintProfiles/responseSection.tsx new file mode 100644 index 0000000..60247c9 --- /dev/null +++ b/src/components/companion/blueprintProfiles/responseSection.tsx @@ -0,0 +1,33 @@ +import { FC } from 'react'; +import { AnimatedBorder } from '../../ui/animated-border'; + +interface ResponseSectionProps { + title: string; + text?: string; + list?: string[]; +} + +const ResponseSection: FC = ({ title, text, list }) => { + return ( + +
+

+ {title} +

+ {list ? ( +
    + {list.map((item, index) => ( +
  • + {item} +
  • + ))} +
+ ) : ( + text &&

{text}

+ )} +
+
+ ); +}; + +export default ResponseSection; diff --git a/src/components/companion/navigation/top-nav.tsx b/src/components/companion/navigation/top-nav.tsx index 5e9ede4..d3ae03b 100644 --- a/src/components/companion/navigation/top-nav.tsx +++ b/src/components/companion/navigation/top-nav.tsx @@ -12,8 +12,7 @@ export const TopNav: React.FC = ({ onMenuClick }) => { return ( { const [userData, setUserData] = useState(null); @@ -17,7 +18,6 @@ const UserProfilePage = () => { useEffect(() => { if (!router.isReady) return; const userQuery = router.query.externalUserId as string | undefined; - console.log(userQuery) if (userQuery) { setUser(userQuery); } @@ -70,28 +70,32 @@ const UserProfilePage = () => { return (
- - - - - {isDelegate ? + - + - : + {userData.responseList && userData.responseList[0] && ( + + )} + {isDelegate ? + + + + : + + + + } + - + - } - - -
); @@ -107,9 +111,10 @@ const data1: UserProfile = { hobby: "Basketball", linkedIn: `linkedin.com/in/daniellee`, profilePicUrl: "https://hoopshype.com/wp-content/uploads/sites/92/2024/11/i_7b_e3_c7_lebron-james.png?w=1000&h=600&crop=1", - funFacts: [ + responseList: [ + "I am steve jobs if he was daniel lee.", "Steve Jobs", - "Clap on clap off lights" + "Blueprint NFC Cards", ], interests: [ "UX/UI Design", @@ -122,27 +127,26 @@ const data1: UserProfile = { }; const data2: UserProfile = { - name: "Yi Long Musk", + name: "Yi Long Mah", role: "Delegate", company: "Tesla", hobby: "Basketball", linkedIn: "linkedin.com/in/danielthegoatlee", profilePicUrl: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTe8Qr5TK-ehPu0lZsZxhmTM1eGAdMVgApwSzYSKFOeQPGbukpuICsAwLQMKQJeuDpgpLU&usqp=CAU", companyLogoUrl: "https://static.vecteezy.com/system/resources/previews/020/336/735/non_2x/tesla-logo-tesla-icon-transparent-png-free-vector.jpg", - funFacts: [ - "Has visited 23 countries around the world even though I've never flown first class.", - "Can speak 3 languages", - "Former competitive swimmer", + responseList: [ + "I am chinese elon musk", + "Elon Musk", + "Cybertruck", ], interests: [ "UX/UI Design", - "Photography", - "Sustainable Design", + "Photography" ], additionalLink: "https://github.com/dlee", }; async function getUserProfile(user: string) { - const data = user=="daniel"? data1 : data2; + const data = user == "daniel" ? data1 : data2; return data; } \ No newline at end of file diff --git a/src/pages/companion/profile/company/[companyId]/index.tsx b/src/pages/companion/profile/company/[companyId]/index.tsx index ffe8599..edce4c1 100644 --- a/src/pages/companion/profile/company/[companyId]/index.tsx +++ b/src/pages/companion/profile/company/[companyId]/index.tsx @@ -5,6 +5,7 @@ import { AnimatedBorder } from '../../../../../components/ui/animated-border'; import { useRouter } from 'next/router'; import NavBarContainer from '@/components/companion/navigation/NavBarContainer'; import { motion } from 'framer-motion'; +import ResponseSection from '@/components/companion/blueprintProfiles/responseSection'; interface CompanyProfile { @@ -85,12 +86,7 @@ export default function CompanyPage() {
- -
-

ABOUT

-

{userData.about}

-
-
+
diff --git a/src/types.ts b/src/types.ts index 5c37355..b15f40e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -43,11 +43,12 @@ export type UserProfile = { role: string; hobby: string; linkedIn: string; - funFacts: string[]; + // funFacts: string[]; interests: string[]; additionalLink: string; profilePicUrl?: string; companyLogoUrl?: string; + responseList?: string[]; // ["I am...". "Stuck on an Island...", "Show an invention to an alien..."] company?: string; major?: string; year?: string;