Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/mobile/app/(authenticated)/(home)/filter/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export default function FilterLayout() {
}}
>
<Stack.Screen name="index" options={{ title: "Filter" }} />
<Stack.Screen name="project" options={{ title: "Project" }} />
<Stack.Screen name="host" options={{ title: "Host" }} />
<Stack.Screen name="sort" options={{ title: "Sort" }} />
</Stack>
Expand Down
3 changes: 0 additions & 3 deletions apps/mobile/app/(authenticated)/(home)/filter/project.tsx

This file was deleted.

39 changes: 0 additions & 39 deletions apps/mobile/screens/(authenticated)/(home)/filter/FilterScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Ionicons from "@expo/vector-icons/Ionicons";
import { Stack, useRouter } from "expo-router";
import { View } from "react-native";
import { useHostProjects } from "@/hooks/useHostProjects";
import { useTheme } from "@/hooks/useTheme";
import {
SORT_OPTIONS,
Expand All @@ -11,26 +10,13 @@ import { useSelectedHost } from "@/screens/(authenticated)/(home)/hooks/useSelec
import { HostStatusDot } from "@/screens/(authenticated)/components/HostStatusDot";
import { ListRow } from "@/screens/(authenticated)/components/ListRow";
import { ListRowValue } from "@/screens/(authenticated)/components/ListRowValue";
import { ProjectAvatar } from "./components/ProjectAvatar";

export function FilterScreen() {
const router = useRouter();
const theme = useTheme();
const projectFilter = useWorkspacesFilterStore(
(store) => store.projectFilter,
);
const selectedHost = useSelectedHost();
const sort = useWorkspacesFilterStore((store) => store.sort);

// Projects are fully local — served by the selected host, not the cloud.
const { projects } = useHostProjects(selectedHost);

const sortedProjects = [...projects].sort((a, b) =>
a.name.localeCompare(b.name),
);
const selectedProject =
sortedProjects.find((project) => project.id === projectFilter) ??
sortedProjects[0];
const sortLabel =
SORT_OPTIONS.find((option) => option.value === sort)?.label ?? "";

Expand All @@ -39,31 +25,6 @@ export function FilterScreen() {
<Stack.Toolbar placement="left">
<Stack.Toolbar.Button icon="xmark" onPress={() => router.back()} />
</Stack.Toolbar>
<ListRow
icon={
<Ionicons
name="folder-outline"
size={20}
color={theme.mutedForeground}
/>
}
label="Project"
trailing={
<ListRowValue
value={selectedProject?.name ?? "All"}
accessory={
selectedProject ? (
<ProjectAvatar
name={selectedProject.name}
iconUrl={selectedProject.iconUrl}
size={22}
/>
) : undefined
}
/>
}
onPress={() => router.push("/(authenticated)/(home)/filter/project")}
/>
<ListRow
icon={
<Ionicons
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading