Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
ichub committed Jul 24, 2024
1 parent de241de commit 38b5dce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/passport-client/components/screens/HomeScreen/Folder.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { getNameFromPath, getParentFolder } from "@pcd/pcd-collection";
import { CSSProperties, useCallback } from "react";
import styled from "styled-components";
import { usePCDsInFolder } from "../../../src/appHooks";
import { cn } from "../../../src/util";

export function FolderCard({
Expand All @@ -16,6 +17,8 @@ export function FolderCard({
onFolderClick(folder);
}, [folder, onFolderClick]);

const pcds = usePCDsInFolder(folder);

return (
<FolderEntryContainer
style={style}
Expand All @@ -27,6 +30,9 @@ export function FolderCard({
)}
>
{getNameFromPath(folder)}
<div className="font-normal text-sm">
{pcds.length} ticket{pcds.length > 1 ? "s" : ""}
</div>
</FolderEntryContainer>
);
}
Expand Down

0 comments on commit 38b5dce

Please sign in to comment.