This commit is contained in:
pradeepkumar
2026-04-15 13:40:27 +05:30
parent 691a9a04a9
commit 1637139f23
4 changed files with 10 additions and 22 deletions

View File

@@ -282,15 +282,6 @@ export default function LoginPage() {
>
<img src="/assets/icons/x.svg" alt="X" className="w-6 h-6" />
</button>
{/* Facebook */}
<button
type="button"
onClick={() => handleSocialLogin('facebook')}
className="w-10 h-10 flex items-center justify-center hover:opacity-70 transition-opacity"
>
<img src="/assets/icons/facebook.svg" alt="Facebook" className="w-6 h-6" />
</button>
</div>
{/* Don't Have Account */}

View File

@@ -345,15 +345,6 @@ export default function SignUpPage() {
>
<img src="/assets/icons/x.svg" alt="X" className="w-6 h-6" />
</button>
{/* Facebook */}
<button
type="button"
onClick={() => handleSocialLogin('facebook')}
className="w-10 h-10 flex items-center justify-center hover:opacity-70 transition-opacity"
>
<img src="/assets/icons/facebook.svg" alt="Facebook" className="w-6 h-6" />
</button>
</div>
</>
);

View File

@@ -120,8 +120,12 @@ function ProfileCard({ profile, resolvedAvatarUrl }: ProfileCardProps) {
let cityValue: string | null = null;
let stateValue: string | null = null;
// Helper to format snake_case to Title Case
const formatValue = (v: string) => v.split('_').map(w => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()).join(' ');
// Helper to format snake_case to Title Case, with uppercase for 2-letter state codes
const formatValue = (v: string) => {
const trimmed = v.trim();
if (/^[a-z]{2}$/i.test(trimmed)) return trimmed.toUpperCase();
return trimmed.split('_').map(w => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()).join(' ');
};
// First, check fieldValues for state and city (dynamic profile fields)
if (profile.fieldValues && profile.fieldValues.length > 0) {
@@ -131,7 +135,6 @@ function ProfileCard({ profile, resolvedAvatarUrl }: ProfileCardProps) {
if (stateField && stateField.jsonValue) {
const value = stateField.jsonValue;
if (Array.isArray(value) && value.length > 0) {
// For multiselect, join all selected values
stateValue = value.map(v => formatValue(String(v))).join(', ');
} else if (typeof value === 'string' && value.trim()) {
stateValue = formatValue(value);

View File

@@ -337,7 +337,10 @@ export function mapFieldValuesToAvailability(fieldValues: FieldValueResponse[]):
* Helper to format snake_case values to Title Case
*/
function formatSnakeCaseToTitleCase(value: string): string {
return value
const trimmed = value.trim();
// 2-letter state abbreviation: uppercase both letters
if (/^[a-z]{2}$/i.test(trimmed)) return trimmed.toUpperCase();
return trimmed
.split('_')
.map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
.join(' ');