Skip to content

Commit b9f6cb8

Browse files
committed
fix: remove all references to icons (for now)
1 parent 5a34769 commit b9f6cb8

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

site/src/pages/WorkspacesPage/WorkspacesButton.tsx

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -130,30 +130,18 @@ function WorkspaceResultsRow({ template }: { template: Template }) {
130130
export function WorkspacesButton() {
131131
const organizationId = useOrganizationId();
132132
const permissions = usePermissions();
133-
134-
const templatesQuery = useQuery({
135-
...templates(organizationId),
136-
137-
// Creating icons via the selector to guarantee icons array stays as stable
138-
// as possible, and only changes when the query produces new data
139-
select: (templates) => {
140-
return {
141-
list: templates,
142-
icons: templates.map((t) => t.icon),
143-
};
144-
},
145-
});
133+
const templatesQuery = useQuery(templates(organizationId));
146134

147135
// Dataset should always be small enough that client-side filtering should be
148136
// good enough. Can swap out down the line if it becomes an issue
149137
const [searchTerm, setSearchTerm] = useState("");
150138
const processed = sortTemplatesByUsersDesc(
151-
templatesQuery.data?.list ?? [],
139+
templatesQuery.data ?? [],
152140
searchTerm,
153141
);
154142

155143
let emptyState: ReactNode = undefined;
156-
if (templatesQuery.data?.list.length === 0) {
144+
if (templatesQuery.data?.length === 0) {
157145
emptyState = (
158146
<EmptyState
159147
message="No templates yet"

0 commit comments

Comments
 (0)