Skip to content

Commit

Permalink
Change how interests are displayed in profile tab
Browse files Browse the repository at this point in the history
  • Loading branch information
duogenesis committed Dec 3, 2023
1 parent 7597354 commit 8b1d19f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions components/club-selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -321,5 +321,6 @@ const ClubSelector = ({navigation, route}) => {
};

export {
ClubItem,
ClubSelector,
};
5 changes: 2 additions & 3 deletions components/profile-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import {
import * as _ from "lodash";
import debounce from 'lodash/debounce';
import { aboutQueue } from '../api/queue';
import { ClubSelector } from './club-selector';
import { ClubItem, ClubSelector } from './club-selector';
import { listen } from '../events/events';

const formatHeight = (og: OptionGroup<OptionGroupInputs>): string | undefined => {
Expand Down Expand Up @@ -328,8 +328,7 @@ const Options = ({navigation, data}) => {
const clubsSetting = (() => {
if (data?.clubs?.length === undefined) return undefined;
if (data.clubs.length === 0) return undefined;
if (data.clubs.length === 1) return '1 club';
if (data.clubs.length > 1) return `${data.clubs.length} clubs`;
return data.clubs.map((clubItem: ClubItem) => clubItem.name).join(', ')
})();

return (
Expand Down

0 comments on commit 8b1d19f

Please sign in to comment.