fix(mobile): show places in Search page on mobile (#9085)

* fix(mobile): show map on mobile

* remove ununsed code
This commit is contained in:
Alex
2024-04-26 00:49:31 -05:00
committed by GitHub
parent d52ed51aab
commit 52bcb46b42
6 changed files with 40 additions and 191 deletions
@@ -27,7 +27,7 @@ class SearchPage extends HookConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final curatedLocation = ref.watch(getCuratedLocationProvider);
final places = ref.watch(getPlacesProvider);
final curatedPeople = ref.watch(getAllPeopleProvider);
final isMapEnabled =
ref.watch(serverInfoProvider.select((v) => v.serverFeatures.map));
@@ -87,18 +87,11 @@ class SearchPage extends HookConsumerWidget {
buildPlaces() {
return SizedBox(
height: imageSize,
child: curatedLocation.widgetWhen(
child: places.widgetWhen(
onError: (error, stack) => const ScaffoldErrorBody(withIcon: false),
onData: (locations) => CuratedPlacesRow(
onData: (data) => CuratedPlacesRow(
isMapEnabled: isMapEnabled,
content: locations
.map(
(o) => CuratedContent(
id: o.id,
label: o.city,
),
)
.toList(),
content: data,
imageSize: imageSize,
onTap: (content, index) {
context.pushRoute(