Skip to content

Commit

Permalink
Fix 'Find Player' button on home page (web)
Browse files Browse the repository at this point in the history
  • Loading branch information
denniske committed Oct 19, 2024
1 parent 7f7d02b commit d864121
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/src/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,13 @@ function AppWrapper() {
tabBarLabel: 'Home',
tabBarIcon: () => 'home',
headerRight: () => (
<Button href="/matches/users/search" icon="search">
<Button href={Platform.OS !== 'web' ? "/matches/users/search" : "/search"} icon="search">
Find Player
</Button>
),
}}
/>
<Tabs.Screen name="search" options={{ href: null }} />
<Tabs.Screen name="matches" options={{ tabBarLabel: 'Matches', tabBarIcon: () => 'chess' }} />
<Tabs.Screen name="explore" options={{ tabBarLabel: 'Explore', tabBarIcon: () => 'landmark' }} />
<Tabs.Screen name="statistics" options={{ tabBarLabel: 'Stats', tabBarIcon: () => 'chart-simple' }} />
Expand Down
11 changes: 11 additions & 0 deletions app/src/app/search.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Search from '@app/view/components/search';
import { Stack, router } from 'expo-router';

export default function SearchPage() {
return (
<>
<Stack.Screen options={{ title: 'Find Player' }} />
<Search selectedUser={(user) => router.navigate(`/matches/users/${user.profileId}?name=${user.name}&country=${user.country}`)} />
</>
);
}
8 changes: 4 additions & 4 deletions app/src/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ export const changelog: IChangelog = {
type: 'minor',
title: 'Implemented [AoE II DE Update 125283](https://www.ageofempires.com/news/age-of-empires-ii-definitive-edition-update-preview-125283/)',
},
// {
// type: 'minor',
// title: 'Load news faster',
// },
{
type: 'bugfix',
title: 'Fix \'Find Player\' button on home page (web)',
},
],
'111.0.0': [
{
Expand Down

0 comments on commit d864121

Please sign in to comment.