-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add local db live apps to discover
- Loading branch information
Showing
6 changed files
with
72 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
apps/ledger-live-desktop/src/renderer/screens/platform/v2/Catalog/LocalLiveAppSection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from "react"; | ||
import { Flex, Text } from "@ledgerhq/react-ui"; | ||
Check failure on line 2 in apps/ledger-live-desktop/src/renderer/screens/platform/v2/Catalog/LocalLiveAppSection.tsx live-github-bot / @Desktop • Test App@typescript-eslint/no-unused-vars
|
||
import { MinimumCard } from "./Card"; | ||
import styled from "styled-components"; | ||
import { LiveAppManifest } from "@ledgerhq/live-common/platform/types"; | ||
import { useHistory } from "react-router"; | ||
import { SectionHeader } from "./SectionHeader"; | ||
import { useTranslation } from "react-i18next"; | ||
|
||
export function LocalLiveAppSection({ localLiveApps }: { localLiveApps: LiveAppManifest[] }) { | ||
console.log("localLiveApps", localLiveApps); | ||
const history = useHistory(); | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<Flex flexDirection="column" marginBottom={4}> | ||
<SectionHeader iconLeft="Download"> | ||
{t("platform.catalog.section.locallyLoaded")} | ||
</SectionHeader> | ||
<Scroll> | ||
{localLiveApps.map(manifest => ( | ||
<Flex key={manifest.id} margin={2}> | ||
<MinimumCard | ||
manifest={manifest} | ||
onClick={(manifest: LiveAppManifest) => history.push(`/platform/${manifest.id}`)} | ||
/> | ||
</Flex> | ||
))} | ||
</Scroll> | ||
</Flex> | ||
); | ||
} | ||
|
||
const Scroll = styled(Flex).attrs({ overflowX: "scroll" })` | ||
&::-webkit-scrollbar { | ||
display: none; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters