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 b1a147a commit 7d02f47
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
27 changes: 27 additions & 0 deletions apps/passport-client/components/screens/HomeScreen/Folder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,33 @@ import { usePCDsInFolder } from "../../../src/appHooks";
import { cn } from "../../../src/util";
import { EVENTS } from "./utils";

export function FolderEventInfo({
folder
}: {
folder: string;
}): React.ReactNode {
const event = EVENTS[folder];

if (!event) {
return null;
}

return (
<div className="flex flex-col overflow-hidden w-full rounded shadow border-2 border-black mt-[0.75rem]">
<div
className="flex w-full h-[200px] "
style={{
backgroundImage: `url(${event.image})`,
backgroundSize: "cover"
}}
></div>
<div className="font-bold text-xl w-full bg-green-800 px-4 py-2 rounded">
{folder}
</div>
</div>
);
}

export function FolderCard({
folder,
onFolderClick,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import {
FolderCard,
FolderDetails,
FolderEntryContainer,
FolderEventInfo,
FolderExplorerContainer
} from "./Folder";
import { isEvent } from "./utils";
Expand Down Expand Up @@ -216,6 +217,10 @@ export function HomeScreenImpl(): JSX.Element | null {
</FolderExplorerContainer>
)}

{isEvent(browsingFolder) && (
<FolderEventInfo folder={browsingFolder} />
)}

{isFrogCrypto ? (
<FrogCryptoHomeSection />
) : isProtocolWorlds ? (
Expand Down

0 comments on commit 7d02f47

Please sign in to comment.