From 2083abb666718ec58cb3389c5fefe223b41bd37b Mon Sep 17 00:00:00 2001 From: Eric Allen Date: Mon, 7 Feb 2022 17:58:07 -0500 Subject: [PATCH] fix: update homepage content; make links more obvious --- src/components/ExternalLink/index.tsx | 11 ++++++ src/components/ProfileCard/index.tsx | 17 ++++---- src/components/PsychometricDropdown/index.tsx | 24 +++++++----- src/components/ThemeToggle/index.tsx | 2 +- src/pages/[...username].tsx | 36 +++++++++++------ src/pages/index.tsx | 39 ++++++++++++------- 6 files changed, 82 insertions(+), 47 deletions(-) create mode 100644 src/components/ExternalLink/index.tsx diff --git a/src/components/ExternalLink/index.tsx b/src/components/ExternalLink/index.tsx new file mode 100644 index 0000000..b16b75d --- /dev/null +++ b/src/components/ExternalLink/index.tsx @@ -0,0 +1,11 @@ +import { Link, LinkProps } from '@chakra-ui/react' + +const ExternalLink = ({ href, children, ...props }: LinkProps): React.ReactElement => { + return ( + + {children} + + ) +} + +export default ExternalLink diff --git a/src/components/ProfileCard/index.tsx b/src/components/ProfileCard/index.tsx index 936b2a9..05221ca 100644 --- a/src/components/ProfileCard/index.tsx +++ b/src/components/ProfileCard/index.tsx @@ -3,6 +3,7 @@ import { Box, Stack, Link, Text, Heading } from '@chakra-ui/react' import UserAvatar from '../UserAvatar' import PsychometricTag from '../PsychometricTag' import InternalLink from '../InternalLink' +import ExternalLink from '../ExternalLink' import { GITHUB_PROFILE_BASE_URL, APPLICATION_URL } from '../../constants' import type { UserProfileProps } from '../../pages/[...username]' @@ -84,9 +85,7 @@ const ProfileCard = ({ - - {profile?.website} - + {profile?.website} {profile?.communicationStyle} @@ -97,23 +96,23 @@ const ProfileCard = ({ {typeof profile?.personality?.type !== 'undefined' && ( - + {profile?.personality.type} | {profile?.personality.name} - + )} {typeof profile?.enneagram?.number !== 'undefined' && ( - + {profile?.enneagram.number} | {profile?.enneagram.name} - + )} {typeof profile?.color?.name !== 'undefined' && ( - + {profile?.color.name} - + )} diff --git a/src/components/PsychometricDropdown/index.tsx b/src/components/PsychometricDropdown/index.tsx index 9659171..9ac18c6 100644 --- a/src/components/PsychometricDropdown/index.tsx +++ b/src/components/PsychometricDropdown/index.tsx @@ -1,5 +1,7 @@ import { useEffect, useState } from 'react' -import { FormControl, FormLabel, Select, FormHelperText, Link } from '@chakra-ui/react' +import { FormControl, FormLabel, Select, FormHelperText, Text } from '@chakra-ui/react' + +import ExternalLink from '../ExternalLink' import type { definitions } from '../../types/supabase' @@ -82,21 +84,23 @@ const PsychometricDropdown = ({ if (psychometric !== null) { return ( - {psychometric.description} -
-
- - Find out more about the {psychometric.type ?? psychometric.name} {label} - - . + +
{psychometric.description}
+
+ + + Find out more about the {psychometric.type ?? psychometric.name} {label} + + . +
) } else if (typeof learnMoreUrl !== 'undefined') { return ( - + Find out more about the {label} psychometric - + . ) diff --git a/src/components/ThemeToggle/index.tsx b/src/components/ThemeToggle/index.tsx index d725240..55cbcc6 100644 --- a/src/components/ThemeToggle/index.tsx +++ b/src/components/ThemeToggle/index.tsx @@ -14,7 +14,7 @@ const ThemeToggle = (): React.ReactElement => { alignItems="center" margin="0" > - + { Type: {profile.personality.name} ({profile.personality.type}) {profile?.personality.description} - - Learn more about the {profile.personality.type} personality type and the{' '} - {profile?.personality.name} archetype - + + Learn more about the{' '} + {profile.personality.type}{' '} + personality type and the{' '} + {profile?.personality.name}{' '} + archetype + )} {typeof profile?.enneagram?.number !== 'undefined' && ( @@ -54,10 +58,15 @@ const UserProfile = ({ profile }: UserProfileProps): React.ReactElement => { Enneagram: {profile?.enneagram.name} ({profile?.enneagram.number}) {profile?.enneagram.description} - - Learn more about the {profile?.enneagram.number} enneagram number and the{' '} - {profile?.enneagram.name} archetype - + + Learn more about the{' '} + + {profile.enneagram.number} Enneagram Number + {' '} + and the{' '} + {profile?.enneagram.name}{' '} + archetype + )} {typeof profile?.color?.name !== 'undefined' && ( @@ -66,9 +75,12 @@ const UserProfile = ({ profile }: UserProfileProps): React.ReactElement => { Color: {profile?.color.name} {profile?.color.description} - - Learn more about the {profile?.color.name} personality color - + + Learn more about the{' '} + + {profile.color.name} personality color + + )} diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 9c3f0d8..1a71cdc 100755 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,11 +1,12 @@ import Head from 'next/head' -import { Heading, Text, Link, Box } from '@chakra-ui/react' +import { Heading, Text, Box } from '@chakra-ui/react' import { useEffect, useState } from 'react' import type { NextPage } from 'next' import Page from '../components/Page' import ProfileCard from '../components/ProfileCard' +import ExternalLink from '../components/ExternalLink' import { getFeaturedProfiles, getFullUserProfile } from '../services/user' import camelCaseKeys from '../utils/camelCaseKeys' import { PSYCHOMETRIC_URLS } from '../constants' @@ -99,30 +100,38 @@ const Home: NextPage = () => { - We want to help you get to know how your colleagues communicate and how to understand - their personality. + Personality profiles are a way to distill parts of your personality and life philosophy + into an easily digestible chunk of information. + + + + They are not a perfect measure, by any means, but they are an interesting measure for you + - and anyone else you share the results with - to consider. They can be especially helpful + in the workplace (or in Open Source projects) where personalities, communication styles, + and philosophies can clash in complicated ways. + + + + Work w/ Me wants to help you provide an easy way to show other developers these + personality psychometrics in a way that might help you understand how to collaborate more + effectively. By using Work w/ Me, you can share a short description of your Communication Style, your{' '} - - Myers Briggs Personality - - ,{' '} - - Enneagram Number - - , and{' '} - + Myers Briggs Personality,{' '} + Enneagram Number, and{' '} + Hartman Personality Profile Color - {' '} - so that people who work with you can get a better understanding of who you are. + {' '} + so that people who work with you can get a better understanding of who you are, how you + think, and what motivates you. {featuredUsers.length > 0 && ( - Featured Users + Get to know a random user: {renderFeaturedProfiles()}