From 4acb5ee020a93f34fdc78a9a3101178c57ff87fa Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Wed, 17 Sep 2025 15:56:17 +0200 Subject: [PATCH] Fix warnings --- backend/api/src/create-user.ts | 2 +- backend/email/emails/new-match.tsx | 18 +- backend/email/emails/new-message.tsx | 47 +- backend/scripts/remove-tiptap-nodes.ts | 2 +- common/src/supabase/schema.ts | 2 +- .../answers/free-response-add-question.tsx | 37 +- web/components/answers/profile-answers.tsx | 11 +- web/components/browse-matches-button.tsx | 457 +++++++++--------- web/components/filters/desktop-filters.tsx | 54 +-- web/components/filters/mobile-filters.tsx | 52 +- web/components/love-page.tsx | 2 +- web/components/profile/profile-profile.tsx | 8 +- web/pages/signin.tsx | 5 +- 13 files changed, 321 insertions(+), 376 deletions(-) diff --git a/backend/api/src/create-user.ts b/backend/api/src/create-user.ts index c2dcebce..e221ba49 100644 --- a/backend/api/src/create-user.ts +++ b/backend/api/src/create-user.ts @@ -21,7 +21,7 @@ export const createUser: APIHandler<'create-user'> = async ( auth, req ) => { - const { deviceToken: preDeviceToken, adminToken } = props + const { deviceToken: preDeviceToken } = props const firebaseUser = await admin.auth().getUser(auth.uid) const testUserAKAEmailPasswordUser = diff --git a/backend/email/emails/new-match.tsx b/backend/email/emails/new-match.tsx index a397e874..df7c07b0 100644 --- a/backend/email/emails/new-match.tsx +++ b/backend/email/emails/new-match.tsx @@ -16,7 +16,7 @@ interface NewMatchEmailProps { export const NewMatchEmail = ({ onUser, matchedWithUser, - matchedProfile, + // matchedProfile, unsubscribeUrl, email }: NewMatchEmailProps) => { @@ -88,11 +88,11 @@ const container = { maxWidth: '600px', } -const logoContainer = { - padding: '20px 0px 5px 0px', - textAlign: 'center' as const, - backgroundColor: '#ffffff', -} +// const logoContainer = { +// padding: '20px 0px 5px 0px', +// textAlign: 'center' as const, +// backgroundColor: '#ffffff', +// } const content = { backgroundColor: '#ffffff', @@ -112,9 +112,9 @@ const imageContainer = { margin: '20px 0', } -const profileImage = { - // border: '1px solid #ec489a', -} +// const profileImage = { +// // border: '1px solid #ec489a', +// } const button = { backgroundColor: '#4887ec', diff --git a/backend/email/emails/new-message.tsx b/backend/email/emails/new-message.tsx index adbe5cb6..6cc6a550 100644 --- a/backend/email/emails/new-message.tsx +++ b/backend/email/emails/new-message.tsx @@ -1,26 +1,9 @@ -import { - Body, - Button, - Container, - Head, - Html, - Img, - Link, - Preview, - Section, - Text, -} from '@react-email/components' -import { type User } from 'common/user' -import { type ProfileRow } from 'common/love/profile' -import { - jamesProfile, - jamesUser, - sinclairProfile, - sinclairUser, -} from './functions/mock' -import { DOMAIN } from 'common/envs/constants' -import { getLoveOgImageUrl } from 'common/love/og-image' -import {button, container, content, Footer, imageContainer, main, paragraph, profileImage} from "email/utils"; +import {Body, Button, Container, Head, Html, Preview, Section, Text,} from '@react-email/components' +import {type User} from 'common/user' +import {type ProfileRow} from 'common/love/profile' +import {jamesProfile, jamesUser, sinclairUser,} from './functions/mock' +import {DOMAIN} from 'common/envs/constants' +import {button, container, content, Footer, imageContainer, main, paragraph} from "email/utils"; interface NewMessageEmailProps { fromUser: User @@ -32,21 +15,21 @@ interface NewMessageEmailProps { } export const NewMessageEmail = ({ - fromUser, - fromUserProfile, - toUser, - channelId, - unsubscribeUrl, - email, -}: NewMessageEmailProps) => { + fromUser, + // fromUserProfile, + toUser, + channelId, + unsubscribeUrl, + email, + }: NewMessageEmailProps) => { const name = toUser.name.split(' ')[0] const creatorName = fromUser.name const messagesUrl = `https://${DOMAIN}/messages/${channelId}` - const userImgSrc = getLoveOgImageUrl(fromUser, fromUserProfile) + // const userImgSrc = getLoveOgImageUrl(fromUser, fromUserProfile) return ( - + New message from {creatorName} diff --git a/backend/scripts/remove-tiptap-nodes.ts b/backend/scripts/remove-tiptap-nodes.ts index 9f16f306..24f3a5ad 100644 --- a/backend/scripts/remove-tiptap-nodes.ts +++ b/backend/scripts/remove-tiptap-nodes.ts @@ -4,7 +4,7 @@ import { select, from, where, -} from '../shared/src/supabase/sql-builder' +} from 'shared/supabase/sql-builder' import { type JSONContent } from '@tiptap/core' const removeNodesOfType = ( diff --git a/common/src/supabase/schema.ts b/common/src/supabase/schema.ts index b8024bfd..1359705f 100644 --- a/common/src/supabase/schema.ts +++ b/common/src/supabase/schema.ts @@ -750,7 +750,7 @@ export type Database = { Returns: Json } ts_to_millis: { - Args: { ts: string } | { ts: string } + Args: { ts: string } Returns: number } } diff --git a/web/components/answers/free-response-add-question.tsx b/web/components/answers/free-response-add-question.tsx index 2951d8db..17b03e24 100644 --- a/web/components/answers/free-response-add-question.tsx +++ b/web/components/answers/free-response-add-question.tsx @@ -1,20 +1,15 @@ -import { PlusIcon } from '@heroicons/react/outline' +import {ArrowLeftIcon, PlusIcon} from '@heroicons/react/outline' import clsx from 'clsx' -import { User } from 'common/user' -import { QuestionWithCountType } from 'web/hooks/use-questions' -import { Button } from 'web/components/buttons/button' -import { Col } from 'web/components/layout/col' -import { - MODAL_CLASS, - Modal, - SCROLLABLE_MODAL_CLASS, -} from 'web/components/layout/modal' -import { Row } from 'web/components/layout/row' -import { IndividualQuestionRow } from '../questions-form' -import { TbMessage } from 'react-icons/tb' -import { OtherProfileAnswers } from './other-profile-answers' -import { ArrowLeftIcon } from '@heroicons/react/outline' -import { usePersistentInMemoryState } from 'web/hooks/use-persistent-in-memory-state' +import {User} from 'common/user' +import {QuestionWithCountType} from 'web/hooks/use-questions' +import {Button} from 'web/components/buttons/button' +import {Col} from 'web/components/layout/col' +import {Modal, MODAL_CLASS, SCROLLABLE_MODAL_CLASS,} from 'web/components/layout/modal' +import {Row} from 'web/components/layout/row' +import {IndividualQuestionRow} from '../questions-form' +import {TbMessage} from 'react-icons/tb' +import {OtherProfileAnswers} from './other-profile-answers' +import {usePersistentInMemoryState} from 'web/hooks/use-persistent-in-memory-state' export function AddQuestionButton(props: { isFirstQuestion?: boolean @@ -22,7 +17,7 @@ export function AddQuestionButton(props: { user: User refreshAnswers: () => void }) { - const { isFirstQuestion, questions, user, refreshAnswers } = props + const {questions, user, refreshAnswers} = props const [openModal, setOpenModal] = usePersistentInMemoryState( false, `add-question-${user.id}` @@ -31,7 +26,7 @@ export function AddQuestionButton(props: { <> @@ -53,7 +48,7 @@ function AddQuestionModal(props: { user: User refreshAnswers: () => void }) { - const { open, setOpen, questions, user, refreshAnswers } = props + const {open, setOpen, questions, user, refreshAnswers} = props const addableQuestions = questions.filter( (q) => q.answer_type === 'free_response' ) @@ -83,7 +78,7 @@ function AddQuestionModal(props: { setExpandedQuestion(null) }} > - + {expandedQuestion.question} @@ -120,7 +115,7 @@ function AddQuestionModal(props: { }} > {question.answer_count} - + ) diff --git a/web/components/answers/profile-answers.tsx b/web/components/answers/profile-answers.tsx index 4b8c0256..d3aaeb87 100644 --- a/web/components/answers/profile-answers.tsx +++ b/web/components/answers/profile-answers.tsx @@ -1,8 +1,7 @@ -import { User } from 'common/user' -import { Col } from 'web/components/layout/col' -import { CompatibilityQuestionsDisplay } from './compatibility-questions-display' -import { FreeResponseDisplay } from './free-response-display' -import { Profile } from 'common/love/profile' +import {User} from 'common/user' +import {Col} from 'web/components/layout/col' +import {CompatibilityQuestionsDisplay} from './compatibility-questions-display' +import {Profile} from 'common/love/profile' export function ProfileAnswers(props: { isCurrentUser: boolean @@ -11,7 +10,7 @@ export function ProfileAnswers(props: { fromSignup?: boolean fromProfilePage?: Profile }) { - const { isCurrentUser, user, fromSignup, fromProfilePage, profile } = props + const {isCurrentUser, user, fromSignup, fromProfilePage, profile} = props return ( diff --git a/web/components/browse-matches-button.tsx b/web/components/browse-matches-button.tsx index a1664696..aec1ef7f 100644 --- a/web/components/browse-matches-button.tsx +++ b/web/components/browse-matches-button.tsx @@ -1,230 +1,227 @@ -import clsx from 'clsx' -import { Editor } from '@tiptap/react' -import { useState } from 'react' -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' -import { Title } from 'web/components/widgets/title' -import { Input } from 'web/components/widgets/input' - -export const BrowseMatchesButton = (props: { - profile: Profile - potentialProfiles: Profile[] - compatibilityScores: Record - className?: string -}) => { - const { profile, potentialProfiles, compatibilityScores, className } = props - - const currentUser = useUser() - const isCurrentUser = currentUser?.id === profile.user_id - - const [dialogOpen, setDialogOpen] = useState(false) - const key = `comment ${potentialProfiles.map((l) => l.id).join(',')}` - const editor = useTextEditor({ - key, - size: 'sm', - max: MAX_COMMENT_LENGTH, - placeholder: 'Write your introduction...', - }) - - const [isSubmitting, setIsSubmitting] = useState(false) - - const submit = async () => { - const introduction = - (editor?.getCharacterCount() ?? 0) > 0 ? editor?.getJSON() : undefined - - // setIsSubmitting(true) - // const result = await createMatch({ - // userId1: profile.user_id, - // userId2: selectedMatchId, - // betAmount, - // introduction, - // }).finally(() => { - // setIsSubmitting(false) - // }) - setDialogOpen(false) - - // console.log('result', result) - - // if (result.success) { - // window.location.reload() - // } - } - if (!profile.looking_for_matches) - return ( -
- Not looking for more matches right now -
- ) - - return ( - <> - - {dialogOpen && ( - - )} - - ) -} - -const BrowseMatchesDialog = (props: { - profile: Profile - potentialProfiles: Profile[] - compatibilityScores: Record - isSubmitting: boolean - setOpen: (open: boolean) => void - submit: () => void - editor: Editor | null -}) => { - const { - profile, - potentialProfiles, - compatibilityScores, - isSubmitting, - setOpen, - submit, - editor, - } = props - - const [query, setQuery] = useState('') - const [error, setError] = useState(undefined) - - const currentUser = useUser() - const isCurrentUser = currentUser?.id === profile.user_id - - const filteredProfiles = potentialProfiles.filter((profile) => - profile.user.name.toLowerCase().includes(query.toLowerCase()) - ) - const [potentialIndex, setPotentialIndex] = useState(0) - const index = Math.min(potentialIndex, filteredProfiles.length - 1) - const potentialProfile = filteredProfiles[index] - - const compatibility = potentialProfile - ? compatibilityScores[potentialProfile.user_id] - : undefined - - return ( - - - - - Browse {!isCurrentUser && `for ${profile.user.name}`} - - { - setQuery(e.target.value) - }} - /> - - {filteredProfiles.length === 0 ? ( - -
No remaining compatible matches.
- - - - - ) : ( - - )} - - {potentialProfile && ( - <> - - window.location.reload()} - fromProfilePage={profile} - /> - - {/* - - - - */} - - )} - -
- ) -} - -function CompatibilityScoreDisplay(props: { - compatibility: CompatibilityScore | undefined -}) { - const { compatibility } = props - - if (!compatibility) return null - - const lowConfidence = compatibility.confidence === 'low' - - return ( - - - compatible - {lowConfidence && ' (low confidence)'} - - ) -} +// import clsx from 'clsx' +// import {Editor} from '@tiptap/react' +// import {useState} from 'react' +// 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' +// import {Title} from 'web/components/widgets/title' +// import {Input} from 'web/components/widgets/input' +// +// export const BrowseMatchesButton = (props: { +// profile: Profile +// potentialProfiles: Profile[] +// compatibilityScores: Record +// className?: string +// }) => { +// const {profile, potentialProfiles, compatibilityScores, className} = props +// +// const currentUser = useUser() +// const isCurrentUser = currentUser?.id === profile.user_id +// +// const [dialogOpen, setDialogOpen] = useState(false) +// const key = `comment ${potentialProfiles.map((l) => l.id).join(',')}` +// const editor = useTextEditor({ +// key, +// size: 'sm', +// max: MAX_COMMENT_LENGTH, +// placeholder: 'Write your introduction...', +// }) +// +// const [isSubmitting, _] = useState(false) +// +// const submit = async () => { +// // const introduction = +// // (editor?.getCharacterCount() ?? 0) > 0 ? editor?.getJSON() : undefined +// +// // setIsSubmitting(true) +// // const result = await createMatch({ +// // userId1: profile.user_id, +// // userId2: selectedMatchId, +// // betAmount, +// // introduction, +// // }).finally(() => { +// // setIsSubmitting(false) +// // }) +// setDialogOpen(false) +// +// // console.log('result', result) +// +// // if (result.success) { +// // window.location.reload() +// // } +// } +// if (!profile.looking_for_matches) +// return ( +//
+// Not looking for more matches right now +//
+// ) +// +// return ( +// <> +// +// {dialogOpen && ( +// +// )} +// +// ) +// } +// +// const BrowseMatchesDialog = (props: { +// profile: Profile +// potentialProfiles: Profile[] +// compatibilityScores: Record +// isSubmitting: boolean +// setOpen: (open: boolean) => void +// submit: () => void +// editor: Editor | null +// }) => { +// const { +// profile, +// potentialProfiles, +// compatibilityScores, +// setOpen, +// } = props +// +// const [query, setQuery] = useState('') +// // const [error, setError] = useState(undefined) +// +// const currentUser = useUser() +// const isCurrentUser = currentUser?.id === profile.user_id +// +// const filteredProfiles = potentialProfiles.filter((profile) => +// profile.user.name.toLowerCase().includes(query.toLowerCase()) +// ) +// const [potentialIndex, setPotentialIndex] = useState(0) +// const index = Math.min(potentialIndex, filteredProfiles.length - 1) +// const potentialProfile = filteredProfiles[index] +// +// const compatibility = potentialProfile +// ? compatibilityScores[potentialProfile.user_id] +// : undefined +// +// return ( +// +// +// +// +// Browse {!isCurrentUser && `for ${profile.user.name}`} +// +// { +// setQuery(e.target.value) +// }} +// /> +// +// {filteredProfiles.length === 0 ? ( +// +//
No remaining compatible matches.
+// +// +// +// +// ) : ( +// +// )} +// +// {potentialProfile && ( +// <> +// +// window.location.reload()} +// fromProfilePage={profile} +// /> +// +// {/* +// +// +// +// */} +// +// )} +// +//
+// ) +// } +// +// function CompatibilityScoreDisplay(props: { +// compatibility: CompatibilityScore | undefined +// }) { +// const {compatibility} = props +// +// if (!compatibility) return null +// +// const lowConfidence = compatibility.confidence === 'low' +// +// return ( +// +// +// compatible +// {lowConfidence && ' (low confidence)'} +// +// ) +// } diff --git a/web/components/filters/desktop-filters.tsx b/web/components/filters/desktop-filters.tsx index 96c1527e..4f58dffc 100644 --- a/web/components/filters/desktop-filters.tsx +++ b/web/components/filters/desktop-filters.tsx @@ -1,30 +1,18 @@ -import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/outline' -import { RelationshipType } from 'web/lib/util/convert-relationship-type' -import { ReactNode } from 'react' -import { FaUserGroup } from 'react-icons/fa6' -import DropdownMenu from 'web/components/comments/dropdown-menu' -import { Col } from 'web/components/layout/col' -import { Row } from 'web/components/layout/row' -import { CustomizeableDropdown } from 'web/components/widgets/customizeable-dropdown' -import { Gender } from 'common/gender' -import { AgeFilter, AgeFilterText } from './age-filter' -import { GenderFilter, GenderFilterText } from './gender-filter' -import { - LocationFilter, - LocationFilterProps, - LocationFilterText, -} from './location-filter' -import { PrefGenderFilter, PrefGenderFilterText } from './pref-gender-filter' -import { - RelationshipFilter, - RelationshipFilterText, -} from './relationship-filter' -import { KidsLabel, wantsKidsLabelsWithIcon } from './wants-kids-filter' -import { HasKidsLabel } from './has-kids-filter' -import { MyMatchesToggle } from './my-matches-toggle' -import { Profile } from 'common/love/profile' +import {ChevronDownIcon, ChevronUpIcon} from '@heroicons/react/outline' +import {RelationshipType} from 'web/lib/util/convert-relationship-type' +import {ReactNode} from 'react' +import {FaUserGroup} from 'react-icons/fa6' +import {Col} from 'web/components/layout/col' +import {Row} from 'web/components/layout/row' +import {CustomizeableDropdown} from 'web/components/widgets/customizeable-dropdown' +import {Gender} from 'common/gender' +import {AgeFilter, AgeFilterText} from './age-filter' +import {GenderFilter, GenderFilterText} from './gender-filter' +import {LocationFilter, LocationFilterProps, LocationFilterText,} from './location-filter' +import {RelationshipFilter, RelationshipFilterText,} from './relationship-filter' +import {MyMatchesToggle} from './my-matches-toggle' +import {Profile} from 'common/love/profile' import {FilterFields} from "common/filters"; -import {hasKidsLabels} from "common/has-kids"; export function DesktopFilters(props: { filters: Partial @@ -60,7 +48,7 @@ export function DesktopFilters(props: { open={open} content={ - + )} dropdownMenuContent={ - + } popoverClassName="bg-canvas-50" menuWidth="w-50" @@ -119,7 +107,7 @@ export function DesktopFilters(props: { )} dropdownMenuContent={ - + } popoverClassName="bg-canvas-50" @@ -140,7 +128,7 @@ export function DesktopFilters(props: { )} dropdownMenuContent={ - + } popoverClassName="bg-canvas-50" @@ -264,15 +252,15 @@ export function DesktopFilters(props: { } export function DropdownButton(props: { open: boolean; content: ReactNode }) { - const { open, content } = props + const {open, content} = props return ( {content} {open ? ( - + ) : ( - + )} diff --git a/web/components/filters/mobile-filters.tsx b/web/components/filters/mobile-filters.tsx index 38c85643..2e7aaad0 100644 --- a/web/components/filters/mobile-filters.tsx +++ b/web/components/filters/mobile-filters.tsx @@ -1,34 +1,17 @@ -import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/outline' +import {ChevronDownIcon, ChevronUpIcon} from '@heroicons/react/outline' import clsx from 'clsx' -import { ReactNode, useState } from 'react' -import { Col } from 'web/components/layout/col' -import { Row } from 'web/components/layout/row' -import { AgeFilter, AgeFilterText, getNoMinMaxAge } from './age-filter' -import { GenderFilter, GenderFilterText } from './gender-filter' -import { HasKidsFilter, HasKidsLabel } from './has-kids-filter' -import { - LocationFilter, - LocationFilterProps, - LocationFilterText, -} from './location-filter' -import { PrefGenderFilter, PrefGenderFilterText } from './pref-gender-filter' -import { - RelationshipFilter, - RelationshipFilterText, -} from './relationship-filter' -import { - KidsLabel, - WantsKidsFilter, - WantsKidsIcon, - wantsKidsLabelsWithIcon, -} from './wants-kids-filter' -import { FaChild } from 'react-icons/fa6' -import { MyMatchesToggle } from './my-matches-toggle' -import { Profile } from 'common/love/profile' -import { Gender } from 'common/gender' -import { RelationshipType } from 'web/lib/util/convert-relationship-type' +import {ReactNode, useState} from 'react' +import {Col} from 'web/components/layout/col' +import {Row} from 'web/components/layout/row' +import {AgeFilter, AgeFilterText, getNoMinMaxAge} from './age-filter' +import {GenderFilter, GenderFilterText} from './gender-filter' +import {LocationFilter, LocationFilterProps, LocationFilterText,} from './location-filter' +import {RelationshipFilter, RelationshipFilterText,} from './relationship-filter' +import {MyMatchesToggle} from './my-matches-toggle' +import {Profile} from 'common/love/profile' +import {Gender} from 'common/gender' +import {RelationshipType} from 'web/lib/util/convert-relationship-type' import {FilterFields} from "common/filters"; -import {hasKidsLabels} from "common/has-kids"; export function MobileFilters(props: { filters: Partial @@ -50,6 +33,7 @@ export function MobileFilters(props: { } = props const [openFilter, setOpenFilter] = useState(undefined) + function hasAny(filterArray: any[] | undefined) { return filterArray && filterArray.length > 0 } @@ -86,7 +70,7 @@ export function MobileFilters(props: { /> } > - + {/* LOCATION */} } > - + {/* GENDER */} } > - + {/* PREFERRED GENDER */} {/*
{isOpen ? ( - + ) : ( - + )}
diff --git a/web/components/love-page.tsx b/web/components/love-page.tsx index 2ecf159a..38a298c5 100644 --- a/web/components/love-page.tsx +++ b/web/components/love-page.tsx @@ -54,7 +54,7 @@ export function LovePage(props: { // eslint-disable-next-line react-hooks/rules-of-hooks trackPageView && useTracking(`view love ${trackPageView}`, trackPageProps) useOnline() - const [isAddFundsModalOpen, setIsAddFundsModalOpen] = useState(false) + const [_, setIsAddFundsModalOpen] = useState(false) return ( <> diff --git a/web/components/profile/profile-profile.tsx b/web/components/profile/profile-profile.tsx index 205938e1..60e08e82 100644 --- a/web/components/profile/profile-profile.tsx +++ b/web/components/profile/profile-profile.tsx @@ -10,8 +10,6 @@ import {ProfileAnswers} from 'web/components/answers/profile-answers' import {SignUpButton} from 'web/components/nav/love-sidebar' import {Profile} from 'common/love/profile' import {ProfileBio} from 'web/components/bio/profile-bio' -import {areGenderCompatible} from 'common/love/compatibility-util' -import {useProfile} from 'web/hooks/use-profile' import {useGetter} from 'web/hooks/use-getter' import {getStars} from 'web/lib/supabase/stars' import {Content} from "web/components/widgets/editor"; @@ -29,7 +27,7 @@ export function ProfileProfile(props: { const {profile, user, refreshProfile, fromProfilePage, fromSignup} = props const currentUser = useUser() - const currentProfile = useProfile() + // const currentProfile = useProfile() // const isCurrentUser = currentUser?.id === user.id const {data: starredUserIds, refresh: refreshStars} = useGetter( @@ -55,8 +53,8 @@ export function ProfileProfile(props: { // const shipped = // !!ships && hasShipped(currentUser, fromProfilePage?.user_id, user.id, ships) - const areCompatible = - !!currentProfile && areGenderCompatible(currentProfile, profile) + // const areCompatible = + // !!currentProfile && areGenderCompatible(currentProfile, profile) // Allow everyone to message everyone for now const showMessageButton = true // liked || likedBack || !areCompatible diff --git a/web/pages/signin.tsx b/web/pages/signin.tsx index aeb5f7c0..79a994ae 100644 --- a/web/pages/signin.tsx +++ b/web/pages/signin.tsx @@ -26,7 +26,7 @@ function RegisterComponent() { const searchParams = useSearchParams(); const [error, setError] = useState(null); const [isLoading, setIsLoading] = useState(false); - const [isLoadingGoogle, setIsLoadingGoogle] = useState(false); + const [_, setIsLoadingGoogle] = useState(false); const user = useUser() useEffect(() => { @@ -64,7 +64,7 @@ function RegisterComponent() { setError(null); try { const creds = await firebaseLogin(); - if (creds){ + if (creds) { setIsLoading(true) setIsLoadingGoogle(true); } @@ -80,6 +80,7 @@ function RegisterComponent() { const handleEmailPasswordSignIn = async (email: string, password: string) => { try { const creds = await signInWithEmailAndPassword(auth, email, password); + console.log(creds) } catch (error) { console.error("Error signing in:", error); const message = 'Failed to sign in with your email and password';