Skip to content

Commit f1bfc6b

Browse files
committed
Fix connection type (2)
1 parent 3283843 commit f1bfc6b

File tree

5 files changed

+21
-16
lines changed

5 files changed

+21
-16
lines changed

common/src/api/zod-types.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@ export const baseLoversSchema = z.object({
5151
pref_age_max: z.number().min(18).max(1000),
5252
pref_relation_styles: z.array(
5353
z.union([
54-
z.literal('mono'),
55-
z.literal('poly'),
56-
z.literal('open'),
57-
z.literal('other'),
54+
z.literal('collaboration'),
55+
z.literal('friendship'),
56+
z.literal('relationship'),
5857
])
5958
),
6059
wants_kids_strength: z.number(),

web/components/filters/choices.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
export const RELATIONSHIP_CHOICES = {
2-
Monogamous: 'mono',
3-
Polyamorous: 'poly',
4-
'Open Relationship': 'open',
5-
Other: 'other',
2+
// Monogamous: 'mono',
3+
// Polyamorous: 'poly',
4+
// 'Open Relationship': 'open',
5+
// Other: 'other',
66
Collaboration: 'collaboration',
77
Friendship: 'friendship',
88
Relationship: 'relationship',
99
};
1010

11-
export const REVERTED_RELATIONSHIP_CHOICES = {}
11+
export const REVERTED_RELATIONSHIP_CHOICES = Object.fromEntries(
12+
Object.entries(RELATIONSHIP_CHOICES).map(([key, value]) => [value, key])
13+
);

web/components/lover-about.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ function RelationshipType(props: { lover: Lover }) {
131131
const relationshipTypes = lover.pref_relation_styles
132132
const seekingGenderText = stringOrStringArrayToText({
133133
text: relationshipTypes.map((rel) =>
134-
convertRelationshipType(rel as RelationshipType)
135-
),
134+
convertRelationshipType(rel as RelationshipType).toLowerCase()
135+
).sort(),
136136
preText: 'Seeking',
137-
postText:
138-
relationshipTypes.length == 1 && relationshipTypes[0] == 'mono'
139-
? 'relationship'
140-
: 'relationships',
137+
// postText:
138+
// relationshipTypes.length == 1 && relationshipTypes[0] == 'mono'
139+
// ? 'relationship'
140+
// : 'relationships',
141141
asSentence: true,
142142
capitalizeFirstLetterOption: false,
143143
})

web/components/optional-lover-form.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import {AddPhotosWidget} from './widgets/add-photos'
2929
import {RadioToggleGroup} from "web/components/widgets/radio-toggle-group";
3030
import {MultipleChoiceOptions} from "common/love/multiple-choice";
3131
import {RELATIONSHIP_CHOICES} from "web/components/filters/choices";
32+
import toast from "react-hot-toast";
3233

3334
export const OptionalLoveUserForm = (props: {
3435
lover: LoverRow
@@ -69,6 +70,10 @@ export const OptionalLoveUserForm = (props: {
6970
)
7071
if (error) {
7172
console.error(error)
73+
toast.error(
74+
`We ran into an issue saving your profile. Please try again or contact us if the issue persists.`
75+
)
76+
setIsSubmitting(false)
7277
return
7378
}
7479
if (!isEqual(newLinks, user.link)) {

web/components/user/social.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
TbBrandSpotify,
1515
TbBrandX,
1616
} from 'react-icons/tb'
17-
import Foldy from 'web/public/manifold-logo.svg'
1817

1918
export const PLATFORM_ICONS: {
2019
[key in Site]: (props: { className?: string }) => ReactNode

0 commit comments

Comments
 (0)