Extract sidebar into set of components #62
No reviewers
Labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
puregarlic/microclimate!62
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue/59-extract-sidebar"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #59.
562b4bc356tod3c880befcd3c880befctoca6f8c8d67WIP: Extract sidebar into set of componentsto Extract sidebar into set of componentsSmall stuff, really.
@ -0,0 +20,4 @@return { channels, currentChannelId };}export default function ChannelSidebarGroup() {For components, use a named export (omit the
default). Default exports in page and layout files are an API requirement.@ -0,0 +30,4 @@const channels = data?.channels ?? [];const currentChannelId = data?.currentChannelId ?? null;async function joinChannel(channelId: string) {There's another hook in
@tanstack/react-queryfor functions that have side effects:useMutation. This hook also gets the query client as a parameter in themutationFn, so you don't need to provide it from theuseQueryClienthook for cache invalidation.@ -0,0 +8,4 @@} from "../ui/sidebar.tsx";import ChannelSidebarGroup from "./channel-group.tsx";export default function MicroclimateSidebar() {Use a named export here as well
LGTM