Rename Love to Profile

This commit is contained in:
MartinBraquet
2025-10-20 16:35:59 +02:00
parent 26a28175fd
commit 15781475b6
42 changed files with 97 additions and 105 deletions

View File

@@ -1,6 +1,6 @@
import { createSupabaseDirectClient } from 'shared/supabase/init'
import { APIError, APIHandler } from './helpers/endpoint'
import { createProfileLikeNotification } from 'shared/create-love-notification'
import { createProfileLikeNotification } from 'shared/create-profile-notification'
import { getHasFreeLike } from './has-free-like'
import { log } from 'shared/utils'
import { tryCatch } from 'common/util/try-catch'

View File

@@ -1,6 +1,6 @@
import { createSupabaseDirectClient } from 'shared/supabase/init'
import { APIError, APIHandler } from './helpers/endpoint'
import { createLoveShipNotification } from 'shared/create-love-notification'
import { createProfileShipNotification } from 'shared/create-profile-notification'
import { log } from 'shared/utils'
import { tryCatch } from 'common/util/try-catch'
import { insert } from 'shared/supabase/utils'
@@ -61,8 +61,8 @@ export const shipProfiles: APIHandler<'ship-profiles'> = async (props, auth) =>
const continuation = async () => {
await Promise.all([
createLoveShipNotification(data, data.target1_id),
createLoveShipNotification(data, data.target2_id),
createProfileShipNotification(data, data.target1_id),
createProfileShipNotification(data, data.target2_id),
])
}

View File

@@ -21,7 +21,7 @@ export const NewMatchEmail = ({
email
}: NewMatchEmailProps) => {
const name = onUser.name.split(' ')[0]
// const userImgSrc = getLoveOgImageUrl(matchedWithUser, matchedProfile)
// const userImgSrc = getOgImageUrl(matchedWithUser, matchedProfile)
const userUrl = `https://${DOMAIN}/${matchedWithUser.username}`
return (

View File

@@ -25,7 +25,7 @@ export const NewMessageEmail = ({
const name = toUser.name.split(' ')[0]
const creatorName = fromUser.name
const messagesUrl = `https://${DOMAIN}/messages/${channelId}`
// const userImgSrc = getLoveOgImageUrl(fromUser, fromUserProfile)
// const userImgSrc = getOgImageUrl(fromUser, fromUserProfile)
return (
<Html>

View File

@@ -14,10 +14,6 @@ select
from
temp_users;
-- Rename temp_love_messages
-- alter table temp_love_messages
-- rename to private_user_messages;
-- alter table private_user_messages
-- alter column channel_id set not null,
-- alter column content set not null,

View File

@@ -39,7 +39,7 @@ export const createProfileLikeNotification = async (like: Row<'profile_likes'>)
return await insertNotificationToSupabase(notification, pg)
}
export const createLoveShipNotification = async (
export const createProfileShipNotification = async (
ship: Row<'profile_ships'>,
recipientId: string
) => {

View File

@@ -1,6 +1,6 @@
import {
contentSchema,
combinedLoveUsersSchema,
combinedProfileSchema,
baseProfilesSchema,
arraybeSchema,
} from 'common/api/zod-types'
@@ -11,7 +11,7 @@ import {Profile, ProfileRow} from 'common/profiles/profile'
import {Row} from 'common/supabase/utils'
import {PrivateUser, User} from 'common/user'
import {z} from 'zod'
import {LikeData, ShipData} from './love-types'
import {LikeData, ShipData} from './profile-types'
import {DisplayUser, FullUser} from './user-types'
import {PrivateMessageChannel} from 'common/supabase/private-messages'
import {Notification} from 'common/notifications'
@@ -160,7 +160,7 @@ export const API = (_apiTypeCheck = {
method: 'POST',
authed: true,
rateLimited: true,
props: combinedLoveUsersSchema.partial(),
props: combinedProfileSchema.partial(),
returns: {} as ProfileRow,
},
'update-notif-settings': {

View File

@@ -94,5 +94,5 @@ const optionalProfilesSchema = z.object({
pref_romantic_styles: z.array(z.string()),
})
export const combinedLoveUsersSchema =
export const combinedProfileSchema =
baseProfilesSchema.merge(optionalProfilesSchema)

View File

@@ -87,6 +87,7 @@ export const RESERVED_PATHS = [
'chat',
'chats',
'common',
'compatibility',
'confirm-email',
'contact',
'contacts',
@@ -110,7 +111,7 @@ export const RESERVED_PATHS = [
'links',
'live',
'login',
'love-questions',
'questions',
'manifest',
'market',
'markets',

View File

@@ -1,6 +1,6 @@
import { isProd } from 'common/envs/is-prod'
export const manifoldLoveUserId = isProd()
export const compassUserId = isProd()
? 'tRZZ6ihugZQLXPf6aPRneGpWLmz1'
: 'RlXR2xa4EFfAzdCbSe45wkcdarh1'

View File

@@ -3,7 +3,7 @@ import { ProfileRow } from 'common/profiles/profile'
import { buildOgUrl } from 'common/util/og'
// TODO: handle age, gender undefined better
export type LoveOgProps = {
export type ogProps = {
// user props
avatarUrl: string
username: string
@@ -14,15 +14,15 @@ export type LoveOgProps = {
gender: string
}
export function getLoveOgImageUrl(user: User, profile?: ProfileRow | null) {
const loveProps = {
export function getProfileOgImageUrl(user: User, profile?: ProfileRow | null) {
const props = {
avatarUrl: profile?.pinned_url,
username: user.username,
name: user.name,
age: profile?.age?.toString() ?? '25',
city: profile?.city ?? 'Internet',
gender: profile?.gender ?? '???',
} as LoveOgProps
} as ogProps
return buildOgUrl(loveProps, 'profile')
return buildOgUrl(props, 'profile')
}

View File

@@ -28,9 +28,6 @@ export type User = {
isBannedFromPosting?: boolean
userDeleted?: boolean
// fromLove?: boolean // whether originally from manifold.love back when it was synced to manifold
// fromManifold?: boolean // whether has a manifold.markets account
sweestakesVerified?: boolean
verifiedPhone?: boolean
idVerified?: boolean

View File

@@ -1,22 +1,22 @@
import { useState } from 'react'
import { Button } from 'web/components/buttons/button'
import { Col } from 'web/components/layout/col'
import { MODAL_CLASS, Modal } from 'web/components/layout/modal'
import { Row } from 'web/components/layout/row'
import { ExpandingInput } from 'web/components/widgets/expanding-input'
import { PlusIcon, XIcon } from '@heroicons/react/outline'
import { MAX_ANSWER_LENGTH } from 'common/envs/constants'
import { useUser } from 'web/hooks/use-user'
import { User } from 'common/user'
import { useEvent } from 'web/hooks/use-event'
import { track } from 'web/lib/service/analytics'
import { toast } from 'react-hot-toast'
import { api } from 'web/lib/api'
import { Row as rowFor } from 'common/supabase/utils'
import { AnswerCompatibilityQuestionContent } from './answer-compatibility-question-content'
import { uniq } from 'lodash'
import { QuestionWithCountType } from 'web/hooks/use-questions'
import { MAX_COMPATIBILITY_QUESTION_LENGTH } from 'common/profiles/constants'
import {useState} from 'react'
import {Button} from 'web/components/buttons/button'
import {Col} from 'web/components/layout/col'
import {Modal, MODAL_CLASS} from 'web/components/layout/modal'
import {Row} from 'web/components/layout/row'
import {ExpandingInput} from 'web/components/widgets/expanding-input'
import {PlusIcon, XIcon} from '@heroicons/react/outline'
import {MAX_ANSWER_LENGTH} from 'common/envs/constants'
import {useUser} from 'web/hooks/use-user'
import {User} from 'common/user'
import {useEvent} from 'web/hooks/use-event'
import {track} from 'web/lib/service/analytics'
import {toast} from 'react-hot-toast'
import {api} from 'web/lib/api'
import {Row as rowFor} from 'common/supabase/utils'
import {AnswerCompatibilityQuestionContent} from './answer-compatibility-question-content'
import {uniq} from 'lodash'
import {QuestionWithCountType} from 'web/hooks/use-questions'
import {MAX_COMPATIBILITY_QUESTION_LENGTH} from 'common/profiles/constants'
export function AddCompatibilityQuestionButton(props: {
refreshCompatibilityAll: () => void
@@ -121,13 +121,13 @@ function CreateCompatibilityModalContent(props: {
const noRepeatOptions = uniq(options).length == options.length
const generateJson = () => {
const jsonObject = options.reduce((obj, item, index) => {
// Note the change in the generic type
return options.reduce((obj, item, index) => {
if (item.trim() !== '') {
obj[item] = index // Mapping each option to its index
}
return obj
}, {} as Record<string, number>) // Note the change in the generic type
return jsonObject
}, {} as Record<string, number>)
}
const onAddQuestion = useEvent(async () => {
@@ -142,7 +142,7 @@ function CreateCompatibilityModalContent(props: {
if (q) {
afterAddQuestion(q as rowFor<'compatibility_prompts'>)
}
track('create love compatibility question')
track('create compatibility question')
} catch (e) {
toast.error('Error creating compatibility question. Try again?')
}

View File

@@ -47,7 +47,7 @@ export function OpinionScale(props: {
size="xs"
className={''}
onClick={() => {
track('edit love questions')
track('edit questions')
Router.push('opinion-scale')
}}
>

View File

@@ -4,14 +4,12 @@
// import Link from 'next/link'
//
// import {MAX_COMMENT_LENGTH} from 'common/comment'
// import {Profile} from 'common/love/profile'
// import {Button} from 'web/components/buttons/button'
// import {Col} from 'web/components/layout/col'
// import {Modal, SCROLLABLE_MODAL_CLASS} from 'web/components/layout/modal'
// import {Row} from 'web/components/layout/row'
// import {useTextEditor} from 'web/components/widgets/editor'
// import {useUser} from 'web/hooks/use-user'
// import {CompatibilityScore} from 'common/love/compatibility-score'
// import {CompatibleBadge} from './widgets/compatible-badge'
// import {ProfileProfile} from './profile/profile-profile'
// import {Pagination} from 'web/components/widgets/pagination'

View File

@@ -13,7 +13,7 @@ import { UserAvatarAndBadge } from 'web/components/widgets/user-link'
import Link from 'next/link'
import DropdownMenu from 'web/components/comments/dropdown-menu'
import { DotsHorizontalIcon, ReplyIcon } from '@heroicons/react/solid'
import { manifoldLoveUserId } from 'common/profiles/constants'
import { compassUserId } from 'common/profiles/constants'
import { DisplayUser } from 'common/api/user-types'
export const ChatMessageItem = memo(function ChatMessageItem(props: {
@@ -129,7 +129,7 @@ export const SystemChatMessageItem = memo(
if (!chat) return null
const hideAvatar =
chat.visibility === 'system_status' &&
chat.userId === manifoldLoveUserId &&
chat.userId === compassUserId &&
chats.length === 1
const totalUsers = otherUsers?.length || 1
return (

View File

@@ -1,6 +1,6 @@
import {useEffect} from "react";
import {Col} from "web/components/layout/col";
import {SignUpButton} from "web/components/nav/love-sidebar";
import {SignUpButton} from "web/components/nav/sidebar";
export function AboutBox(props: {
title: string

View File

@@ -4,8 +4,8 @@ import {MenuAlt3Icon} from '@heroicons/react/solid'
import {Dialog, Transition} from '@headlessui/react'
import {Fragment, useState} from 'react'
import {useRouter} from 'next/router'
import Sidebar from './love-sidebar'
import {Item} from './love-sidebar-item'
import Sidebar from './sidebar'
import {Item} from './sidebar-item'
import {useUser} from 'web/hooks/use-user'
import {Avatar} from 'web/components/widgets/avatar'
import {useIsIframe} from 'web/hooks/use-is-iframe'

View File

@@ -10,8 +10,8 @@ import Router, { useRouter } from 'next/router'
import { useUser } from 'web/hooks/use-user'
import { firebaseLogin, firebaseLogout } from 'web/lib/firebase/users'
import { withTracking } from 'web/lib/service/analytics'
import { ProfileSummary } from './love-profile-summary'
import { Item, SidebarItem } from './love-sidebar-item'
import { ProfileSummary } from './profile-summary'
import { Item, SidebarItem } from './sidebar-item'
import SiteLogo from '../site-logo'
import { Button, ColorType, SizeType } from 'web/components/buttons/button'
import {signupRedirect} from 'web/lib/util/signup'

View File

@@ -33,7 +33,7 @@ export function NotificationItem(props: { notification: Notification }) {
} else if (reason === 'new_profile_like') {
return <ProfileLikeNotification {...params} />
} else if (reason === 'new_profile_ship') {
return <LoveShipNotification {...params} />
return <ProfileShipNotification {...params} />
} else {
return <>unknown notification: {sourceType}</>
}
@@ -164,7 +164,7 @@ function ProfileLikeNotification(props: {
)
}
function LoveShipNotification(props: {
function ProfileShipNotification(props: {
notification: Notification
highlighted: boolean
setHighlighted: (highlighted: boolean) => void

View File

@@ -31,7 +31,7 @@ import {MultipleChoiceOptions} from "common/profiles/multiple-choice";
import {POLITICAL_CHOICES, RELATIONSHIP_CHOICES, ROMANTIC_CHOICES} from "web/components/filters/choices";
import toast from "react-hot-toast";
export const OptionalLoveUserForm = (props: {
export const OptionalProfileUserForm = (props: {
profile: ProfileRow
setProfile: <K extends Column<'profiles'>>(key: K, value: ProfileRow[K]) => void
user: User
@@ -87,7 +87,7 @@ export const OptionalLoveUserForm = (props: {
onSubmit && (await onSubmit())
setIsSubmitting(false)
track('submit love optional profile')
track('submit optional profile')
if (user)
router.push(`/${user.username}${fromSignup ? '?fromSignup=true' : ''}`)
else router.push('/')

View File

@@ -14,12 +14,12 @@ import {ReactNode, useState} from 'react'
import {Toaster} from 'react-hot-toast'
import {Col} from 'web/components/layout/col'
import {PrivateMessagesIcon} from 'web/components/messaging/messages-icon'
import {BottomNavBar} from 'web/components/nav/love-bottom-nav-bar'
import {BottomNavBar} from 'web/components/nav/bottom-nav-bar'
import {useIsMobile} from 'web/hooks/use-is-mobile'
import {useTracking} from 'web/hooks/use-tracking'
import {useUser} from 'web/hooks/use-user'
import {GoogleOneTapLogin} from 'web/lib/firebase/google-onetap-login'
import Sidebar from './nav/love-sidebar'
import Sidebar from './nav/sidebar'
import {useProfile} from 'web/hooks/use-profile'
import {Profile} from 'common/profiles/profile'
import {NotificationsIcon, SolidNotificationsIcon} from './notifications-icon'
@@ -55,7 +55,7 @@ export function PageBase(props: {
const mobileSidebarOptions = getMobileSidebar(() => setIsAddFundsModalOpen(true))
// eslint-disable-next-line react-hooks/rules-of-hooks
trackPageView && useTracking(`view love ${trackPageView}`, trackPageProps)
trackPageView && useTracking(`view ${trackPageView}`, trackPageProps)
useOnline()
const [_, setIsAddFundsModalOpen] = useState(false)

View File

@@ -6,7 +6,7 @@ import { buildArray } from 'common/util/array'
import { Carousel } from 'web/components/widgets/carousel'
import { MODAL_CLASS, Modal } from 'web/components/layout/modal'
import { Col } from 'web/components/layout/col'
import { SignUpButton } from './nav/love-sidebar'
import { SignUpButton } from './nav/sidebar'
import { Profile } from 'common/profiles/profile'
import { useAdmin } from 'web/hooks/use-admin'
import { Button } from 'web/components/buttons/button'

View File

@@ -110,7 +110,7 @@ function ProfilePreview(props: {
return (
<Link
onClick={() => track('click love profile preview')}
onClick={() => track('clickprofile preview')}
href={`/${user.username}`}
className="cursor-pointer group block bg-canvas-100 rounded-lg overflow-hidden shadow hover:shadow-md transition-shadow duration-200 h-full"
>

View File

@@ -80,7 +80,7 @@ export default function ProfileHeader(props: {
<Button
color={'gray-outline'}
onClick={() => {
track('edit love profile')
track('editprofile')
Router.push('profile')
}}
size="sm"

View File

@@ -7,7 +7,7 @@ import {useUser} from 'web/hooks/use-user'
import {User} from 'web/lib/firebase/users'
import ProfileAbout from 'web/components/profile-about'
import {ProfileAnswers} from 'web/components/answers/profile-answers'
import {SignUpButton} from 'web/components/nav/love-sidebar'
import {SignUpButton} from 'web/components/nav/sidebar'
import {Profile} from 'common/profiles/profile'
import {ProfileBio} from 'web/components/bio/profile-bio'
import {useGetter} from 'web/hooks/use-getter'

View File

@@ -45,7 +45,7 @@ export const QuestionsForm = (props: { questionType: QuestionType }) => {
<Button
color={'indigo-outline'}
onClick={() => {
track(`submit love questions page ${questionType}`)
track(`submitquestions page ${questionType}`)
if (user) router.push(`/${user.username}`)
else router.push('/')
}}
@@ -59,8 +59,8 @@ export const QuestionsForm = (props: { questionType: QuestionType }) => {
</Col>
)
}
type loveAnswer = rowFor<'compatibility_answers_free'>
export type loveAnswerState = Omit<loveAnswer, 'id' | 'created_time'>
type compatibilityAnswer = rowFor<'compatibility_answers_free'>
export type compatibilityAnswerState = Omit<compatibilityAnswer, 'id' | 'created_time'>
const fetchPrevious = async (id: number, userId: string) => {
const res = await run(
@@ -96,11 +96,11 @@ export const filterKeys = (
return Object.fromEntries(filteredEntries)
}
const submitAnswer = async (newForm: loveAnswerState) => {
const submitAnswer = async (newForm: compatibilityAnswerState) => {
if (!newForm) return
const input = {
...filterKeys(newForm, (key, _) => !['id', 'created_time'].includes(key)),
} as loveAnswerState
} as compatibilityAnswerState
await run(
db
.from('compatibility_answers_free')
@@ -112,9 +112,9 @@ const QuestionRow = (props: { row: rowFor<'compatibility_prompts'>; user: User }
const { row, user } = props
const { question, id, answer_type, multiple_choice_options } = row
const options = multiple_choice_options as Record<string, number>
const [form, setForm] = usePersistentLocalState<loveAnswerState>(
const [form, setForm] = usePersistentLocalState<compatibilityAnswerState>(
getInitialForm(user.id, id),
`love_answer_${id}_user_${user.id}`
`compatibility_answer_${id}_user_${user.id}`
)
useEffect(() => {
@@ -176,9 +176,9 @@ export const IndividualQuestionRow = (props: {
const { row, user, onCancel, onSubmit, initialAnswer, className } = props
const { id, answer_type, multiple_choice_options } = row
const options = multiple_choice_options as Record<string, number>
const [form, setForm] = usePersistentLocalState<loveAnswerState>(
const [form, setForm] = usePersistentLocalState<compatibilityAnswerState>(
initialAnswer ?? getInitialForm(user.id, id),
`love_answer_${id}_user_${user.id}`
`compatibility_answer_${id}_user_${user.id}`
)
useEffect(() => {

View File

@@ -35,7 +35,7 @@ export const initialRequiredState = {
// initialRequiredState
// ) as (keyof typeof initialRequiredState)[]
export const RequiredLoveUserForm = (props: {
export const RequiredProfileUserForm = (props: {
user: User
// TODO thread this properly instead of this jank
setEditUsername?: (name: string) => unknown

View File

@@ -14,7 +14,7 @@ import { useUserById } from 'web/hooks/use-user-supabase'
import { SendMessageButton } from 'web/components/messaging/send-message-button'
import { ShipsList } from './ships-display'
import { Subtitle } from './profile-subtitle'
import { LikeData, ShipData } from 'common/api/love-types'
import { LikeData, ShipData } from 'common/api/profile-types'
export const LikesDisplay = (props: {
likesGiven: LikeData[]

View File

@@ -16,7 +16,7 @@ export const ShareProfileButton = (props: {
<CopyLinkOrShareButton
className={className}
url={shareUrl}
eventTrackingName="share love profile"
eventTrackingName="shareprofile"
>
<div className="ml-2 text-sm">Share</div>
</CopyLinkOrShareButton>

View File

@@ -15,7 +15,7 @@ import { useUser } from 'web/hooks/use-user'
import { Subtitle } from './profile-subtitle'
import { ShipButton } from './ship-button'
import { hasShipped } from 'web/lib/util/ship-util'
import { ShipData } from 'common/api/love-types'
import { ShipData } from 'common/api/profile-types'
import { useUserById } from 'web/hooks/use-user-supabase'
import { User } from 'common/user'

View File

@@ -1,4 +1,4 @@
import { ShipData } from 'common/api/love-types'
import { ShipData } from 'common/api/profile-types'
import { User } from 'common/user'
export const hasShipped = (

View File

@@ -9,7 +9,7 @@ import {useUser} from 'web/hooks/use-user'
import {useTracking} from 'web/hooks/use-tracking'
import {BackButton} from 'web/components/back-button'
import {useSaveReferral} from 'web/hooks/use-save-referral'
import {getLoveOgImageUrl} from 'common/profiles/og-image'
import {getProfileOgImageUrl} from 'common/profiles/og-image'
import {getProfileRow, ProfileRow} from 'common/profiles/profile'
import {db} from 'web/lib/supabase/db'
import {ProfileInfo} from 'web/components/profile/profile-info'
@@ -125,7 +125,7 @@ function UserPageInner(props: ActiveUserPageProps) {
// const isCurrentUser = currentUser?.id === user?.id
useSaveReferral(currentUser, {defaultReferrerUsername: username})
useTracking('view love profile', {username: user?.username})
useTracking('viewprofile', {username: user?.username})
const [staticProfile] = useState(
props.profile && user ? {...props.profile, user: user} : null
@@ -145,7 +145,7 @@ function UserPageInner(props: ActiveUserPageProps) {
title={`${user.name}`}
description={user.bio ?? ''}
url={`/${user.username}`}
image={getLoveOgImageUrl(user, profile)}
image={getProfileOgImageUrl(user, profile)}
/>
{(user.isBannedFromPosting || user.userDeleted) && (
<Head>

View File

@@ -3,7 +3,7 @@ import { ImageResponseOptions } from '@vercel/og/dist/types'
import { NextRequest } from 'next/server'
import { classToTw } from 'web/components/og/utils'
import { Gender, convertGender } from 'common/gender'
import { LoveOgProps } from 'common/profiles/og-image'
import { ogProps } from 'common/profiles/og-image'
export const config = { runtime: 'edge' }
@@ -42,7 +42,7 @@ function capitalize(str: string) {
return str.charAt(0).toUpperCase() + str.slice(1)
}
function OgProfile(props: LoveOgProps) {
function OgProfile(props: ogProps) {
const { avatarUrl, username, name, age, city, gender } = props
return (
<div
@@ -108,10 +108,10 @@ export default async function handler(req: NextRequest) {
try {
const { searchParams } = new URL(req.url)
const options = await getCardOptions()
const loveOgProps = Object.fromEntries(
const ogProps = Object.fromEntries(
searchParams.entries()
) as LoveOgProps
const image = OgProfile(loveOgProps)
) as ogProps
const image = OgProfile(ogProps)
return new ImageResponse(classToTw(image), options as ImageResponseOptions)
} catch (e: any) {

View File

@@ -1,8 +1,8 @@
import {Profile, ProfileRow} from 'common/profiles/profile'
import {Column} from 'common/supabase/utils'
import {User} from 'common/user'
import {OptionalLoveUserForm} from 'web/components/optional-profile-form'
import {RequiredLoveUserForm} from 'web/components/required-profile-form'
import {OptionalProfileUserForm} from 'web/components/optional-profile-form'
import {RequiredProfileUserForm} from 'web/components/required-profile-form'
import {useProfileByUser} from 'web/hooks/use-profile'
import Router from 'next/router'
import {useEffect, useState} from 'react'
@@ -43,7 +43,7 @@ function ProfilePageInner(props: { user: User; profile: Profile }) {
<PageBase trackPageView={'profile'}>
<Col className="items-center">
<Col className={'w-full px-6 py-4'}>
<RequiredLoveUserForm
<RequiredProfileUserForm
user={user}
setProfile={setProfileState}
profile={profile}
@@ -53,7 +53,7 @@ function ProfilePageInner(props: { user: User; profile: Profile }) {
setEditDisplayName={setDisplayName}
/>
<div className={'h-4'}/>
<OptionalLoveUserForm
<OptionalProfileUserForm
profile={profile}
user={user}
setProfile={setProfileState}

View File

@@ -15,18 +15,18 @@ export default function ReferralsPage() {
: `https://${ENV_CONFIG.domain}/`
return (
<PageBase trackPageView={'love referrals'} className="items-center">
<PageBase trackPageView={'referrals'} className="items-center">
<SEO
title="Share the love"
title="Compass"
description={`Invite someone to join Compass!`}
/>
<Col className="bg-canvas-0 rounded-lg p-4 sm:p-8">
<Title>Share the love!</Title>
<Title>Invite someone to join Compass!</Title>
<div className="mb-4">Invite someone to join</div>
<CopyLinkRow url={url} eventTrackingName="copy love referral" />
<CopyLinkRow url={url} eventTrackingName="copyreferral" />
<QRCode url={url} className="mt-4 self-center" />
</Col>

View File

@@ -1,7 +1,7 @@
import {useEffect, useRef, useState} from 'react'
import {Col} from 'web/components/layout/col'
import {initialRequiredState, RequiredLoveUserForm,} from 'web/components/required-profile-form'
import {OptionalLoveUserForm} from 'web/components/optional-profile-form'
import {initialRequiredState, RequiredProfileUserForm,} from 'web/components/required-profile-form'
import {OptionalProfileUserForm} from 'web/components/optional-profile-form'
import {useUser} from 'web/hooks/use-user'
import {CompassLoadingIndicator} from 'web/components/widgets/loading-indicator'
import {CACHED_REFERRAL_USERNAME_KEY,} from 'web/lib/firebase/users'
@@ -20,7 +20,7 @@ export default function SignupPage() {
const user = useUser()
console.debug('user:', user)
const router = useRouter()
useTracking('view love signup page')
useTracking('viewsignup page')
// Hold loading indicator for 5s when user transitions from undefined -> null
const prevUserRef = useRef<ReturnType<typeof useUser>>()
@@ -73,7 +73,7 @@ export default function SignupPage() {
if (step === 1 && user) {
return <PageBase trackPageView={'register'}>
<Col className={'w-full px-6 py-4'}>
<OptionalLoveUserForm
<OptionalProfileUserForm
setProfile={setProfileState}
profile={profileForm}
user={user}
@@ -95,7 +95,7 @@ export default function SignupPage() {
) : (
<Col className={'w-full max-w-2xl px-6 py-4'}>
{step === 0 ? (
<RequiredLoveUserForm
<RequiredProfileUserForm
user={user}
setProfile={setProfileState}
profile={profileForm}
@@ -127,7 +127,7 @@ export default function SignupPage() {
setProfileForm(profile)
setStep(1)
scrollTo(0, 0)
track('submit love required profile')
track('submitrequired profile')
}
}}
/>