diff --git a/common/src/api/zod-types.ts b/common/src/api/zod-types.ts index 0a1263d1..1d8b49b6 100644 --- a/common/src/api/zod-types.ts +++ b/common/src/api/zod-types.ts @@ -51,10 +51,9 @@ export const baseLoversSchema = z.object({ pref_age_max: z.number().min(18).max(1000), pref_relation_styles: z.array( z.union([ - z.literal('mono'), - z.literal('poly'), - z.literal('open'), - z.literal('other'), + z.literal('collaboration'), + z.literal('friendship'), + z.literal('relationship'), ]) ), wants_kids_strength: z.number(), diff --git a/web/components/filters/choices.tsx b/web/components/filters/choices.tsx index e3ebdf17..fc67809a 100644 --- a/web/components/filters/choices.tsx +++ b/web/components/filters/choices.tsx @@ -1,11 +1,13 @@ export const RELATIONSHIP_CHOICES = { - Monogamous: 'mono', - Polyamorous: 'poly', - 'Open Relationship': 'open', - Other: 'other', + // Monogamous: 'mono', + // Polyamorous: 'poly', + // 'Open Relationship': 'open', + // Other: 'other', Collaboration: 'collaboration', Friendship: 'friendship', Relationship: 'relationship', }; -export const REVERTED_RELATIONSHIP_CHOICES = {} \ No newline at end of file +export const REVERTED_RELATIONSHIP_CHOICES = Object.fromEntries( + Object.entries(RELATIONSHIP_CHOICES).map(([key, value]) => [value, key]) +); \ No newline at end of file diff --git a/web/components/lover-about.tsx b/web/components/lover-about.tsx index 0c3aff22..ad9ddca1 100644 --- a/web/components/lover-about.tsx +++ b/web/components/lover-about.tsx @@ -131,13 +131,13 @@ function RelationshipType(props: { lover: Lover }) { const relationshipTypes = lover.pref_relation_styles const seekingGenderText = stringOrStringArrayToText({ text: relationshipTypes.map((rel) => - convertRelationshipType(rel as RelationshipType) - ), + convertRelationshipType(rel as RelationshipType).toLowerCase() + ).sort(), preText: 'Seeking', - postText: - relationshipTypes.length == 1 && relationshipTypes[0] == 'mono' - ? 'relationship' - : 'relationships', + // postText: + // relationshipTypes.length == 1 && relationshipTypes[0] == 'mono' + // ? 'relationship' + // : 'relationships', asSentence: true, capitalizeFirstLetterOption: false, }) diff --git a/web/components/optional-lover-form.tsx b/web/components/optional-lover-form.tsx index f1712902..b10c15fd 100644 --- a/web/components/optional-lover-form.tsx +++ b/web/components/optional-lover-form.tsx @@ -29,6 +29,7 @@ import {AddPhotosWidget} from './widgets/add-photos' import {RadioToggleGroup} from "web/components/widgets/radio-toggle-group"; import {MultipleChoiceOptions} from "common/love/multiple-choice"; import {RELATIONSHIP_CHOICES} from "web/components/filters/choices"; +import toast from "react-hot-toast"; export const OptionalLoveUserForm = (props: { lover: LoverRow @@ -69,6 +70,10 @@ export const OptionalLoveUserForm = (props: { ) if (error) { console.error(error) + toast.error( + `We ran into an issue saving your profile. Please try again or contact us if the issue persists.` + ) + setIsSubmitting(false) return } if (!isEqual(newLinks, user.link)) { diff --git a/web/components/user/social.tsx b/web/components/user/social.tsx index f32c02ae..52ce2ab2 100644 --- a/web/components/user/social.tsx +++ b/web/components/user/social.tsx @@ -14,7 +14,6 @@ import { TbBrandSpotify, TbBrandX, } from 'react-icons/tb' -import Foldy from 'web/public/manifold-logo.svg' export const PLATFORM_ICONS: { [key in Site]: (props: { className?: string }) => ReactNode