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
8 changes: 4 additions & 4 deletions src/components/UI/Sidebar/sidebarButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface SidebarButtonProps {
count?: number;
active?: boolean;
Icon?: LucideIcon;
element?;
children: React.ReactNode;
onClick?: () => void;
disabled?: boolean;
}
Expand All @@ -16,7 +16,7 @@ export const SidebarButton = ({
active,
Icon,
count,
element,
children,
onClick,
disabled = false,
}: SidebarButtonProps) => (
Expand All @@ -28,8 +28,8 @@ export const SidebarButton = ({
disabled={disabled}
>
{Icon && <Icon size={16} />}
{element && element}
{children && children}
<span className="flex flex-1 justify-start shrink-0">{label}</span>
{count > 0 && !active && <div className="justify-end text-white rounded-[20%] px-[2%] bg-[rgb(195,0,0)]">{count}</div>}
{count && count > 0 && !active && <div className="justify-end text-white rounded-[20%] px-[2%] bg-[rgb(195,0,0)]">{count}</div>}
</Button>
);
2 changes: 1 addition & 1 deletion src/core/subscriptions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Device } from "@core/stores/deviceStore.ts";
import { MeshDevice, Protobuf } from "@meshtastic/core";
import type { MessageStore } from "@core/stores/messageStore.ts";
import { MessageType, type MessageStore } from "@core/stores/messageStore.ts";
import PacketToMessageDTO from "@core/dto/PacketToMessageDTO.ts";

export const subscribeAll = (
Expand Down