Extract sidebar into set of components #62

Merged
seb merged 2 commits from issue/59-extract-sidebar into main 2026-04-10 10:48:05 -07:00
Collaborator

Closes #59.

Closes #59.
seb self-assigned this 2026-02-26 16:31:36 -08:00
seb force-pushed issue/59-extract-sidebar from 562b4bc356 to d3c880befc 2026-03-14 18:40:13 -07:00 Compare
seb force-pushed issue/59-extract-sidebar from d3c880befc to ca6f8c8d67 2026-03-14 19:38:56 -07:00 Compare
seb changed title from WIP: Extract sidebar into set of components to Extract sidebar into set of components 2026-03-14 19:42:02 -07:00
seb requested review from puregarlic 2026-03-15 17:40:13 -07:00
puregarlic left a comment
Owner

Small stuff, really.

Small stuff, really.
@ -0,0 +20,4 @@
return { channels, currentChannelId };
}
export default function ChannelSidebarGroup() {
Owner

For components, use a named export (omit the default). Default exports in page and layout files are an API requirement.

For components, use a named export (omit the `default`). Default exports in page and layout files are an API requirement.
seb marked this conversation as resolved
@ -0,0 +30,4 @@
const channels = data?.channels ?? [];
const currentChannelId = data?.currentChannelId ?? null;
async function joinChannel(channelId: string) {
Owner

There's another hook in @tanstack/react-query for functions that have side effects: useMutation. This hook also gets the query client as a parameter in the mutationFn, so you don't need to provide it from the useQueryClient hook for cache invalidation.

There's another hook in `@tanstack/react-query` for functions that have side effects: `useMutation`. This hook also gets the query client as a parameter in the `mutationFn`, so you don't need to provide it from the `useQueryClient` hook for cache invalidation.
seb marked this conversation as resolved
@ -0,0 +8,4 @@
} from "../ui/sidebar.tsx";
import ChannelSidebarGroup from "./channel-group.tsx";
export default function MicroclimateSidebar() {
Owner

Use a named export here as well

Use a named export here as well
seb marked this conversation as resolved
seb requested review from tepichord 2026-04-10 10:44:31 -07:00
Collaborator

LGTM

LGTM
tepichord approved these changes 2026-04-10 10:46:46 -07:00
seb merged commit 3fd6d1c83b into main 2026-04-10 10:48:05 -07:00
seb deleted branch issue/59-extract-sidebar 2026-04-10 10:48:05 -07:00
Sign in to join this conversation.
No description provided.