Skip to content

Commit

Permalink
rewrite for new backend
Browse files Browse the repository at this point in the history
  • Loading branch information
denniske committed Aug 17, 2023
1 parent b5a32fd commit eede965
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/src/view/components/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ interface ISearchProps {

export default function Search({title, selectedUser, actionText, action}: ISearchProps) {
const styles = useStyles();
const [text, setText] = useState('209525');
const [text, setText] = useState('');
const previousText = usePrevious(text);
const [fetchingMore, setFetchingMore] = useState(false);
const [fetchedAll, setFetchedAll] = useState(false);
Expand Down
4 changes: 2 additions & 2 deletions app/src/view/leaderboard.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function Leaderboard({leaderboardId}: any) {
console.log(Constants.expoConfig?.extra?.eas.projectId);
const myRank = useLazyApi(
{},
fetchLeaderboard, leaderboardId, getParams(1, auth.profileId)
fetchLeaderboard, leaderboardId, getParams(1, auth?.profileId)
);

const matches = useLazyApi(
Expand Down Expand Up @@ -247,7 +247,7 @@ function Leaderboard({leaderboardId}: any) {

const _renderRow = (player: ILeaderboardPlayerNew, i: number, isMyRankRow: boolean = false) => {
// console.log('RENDER ROW', player, i, isMyRankRow);
const isMe = player?.profileId === auth.profileId;
const isMe = player?.profileId === auth?.profileId;
const rowStyle = { minHeight: isMyRankRow ? headerMyRankHeight : rowHeight };
const weightStyle = { fontWeight: isMe ? 'bold' : 'normal' } as TextStyle;
const rankWidthStyle = { width: isMyRankRow ? undefined : rankWidth } as ViewStyle;
Expand Down
8 changes: 4 additions & 4 deletions app/src/view/main/main-profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ function MainProfileInternal({profileId}: {profileId: number}) {
'profile', 'rating-header', 'rating',
];

if (profileId !== auth.profileId && auth) {
// list.push('matches5-header', ...(matches.data || Array(5).fill(null)), 'matches5-footer');
// list.push('matchesVersus-header', ...(matchesVersus.data || Array(5).fill(null)), 'matchesVersus-footer');
}
// if (profileId !== auth.profileId && auth) {
// // list.push('matches5-header', ...(matches.data || Array(5).fill(null)), 'matches5-footer');
// // list.push('matchesVersus-header', ...(matchesVersus.data || Array(5).fill(null)), 'matchesVersus-footer');
// }

// useEffect(() => {
// if (!sameUserNull(user, auth) && auth) {
Expand Down

0 comments on commit eede965

Please sign in to comment.