Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
Remove all $FlowFixMe for exported memo
Browse files Browse the repository at this point in the history
  • Loading branch information
lambertkevin committed Apr 4, 2022
1 parent cb3d031 commit a326406
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 26 deletions.
3 changes: 1 addition & 2 deletions src/renderer/components/Breadcrumb/NFTCrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,4 @@ const NFTCrumb = () => {
);
};

// $FlowFixMe
export default memo(NFTCrumb);
export default memo<{}>(NFTCrumb);
3 changes: 1 addition & 2 deletions src/renderer/components/ContextMenu/NFTContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ const NFTContextMenu = ({ leftClick, children, contract, tokenId, currencyId }:
);
};

// $FlowFixMe
export default memo(NFTContextMenu);
export default memo<Props>(NFTContextMenu);
3 changes: 1 addition & 2 deletions src/renderer/drawers/NFTViewerDrawer/ExternalViewerButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,4 @@ const ExternalViewerButton = ({
);
};

// $FlowFixMe
export default memo(ExternalViewerButton);
export default memo<ExternalViewerButtonProps>(ExternalViewerButton);
3 changes: 1 addition & 2 deletions src/renderer/drawers/NFTViewerDrawer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,5 +312,4 @@ const NFTViewerDrawer = ({ account, nftId, height }: NFTViewerDrawerProps) => {
);
};

// $FlowFixMe
export default memo(NFTViewerDrawer);
export default memo<NFTViewerDrawerProps>(NFTViewerDrawer);
10 changes: 7 additions & 3 deletions src/renderer/screens/nft/CollectionName.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ import Skeleton from "~/renderer/screens/nft/Skeleton";

import type { ProtoNFT } from "@ledgerhq/live-common/lib/types";

type Props = {
nft: ProtoNFT,
fallback?: string,
};

// TODO Make me pretty
const CollectionName = ({ nft, fallback }: { nft: ProtoNFT, fallback?: string }) => {
const CollectionName = ({ nft, fallback }: Props) => {
const { status, metadata } = useNftMetadata(nft.contract, nft.tokenId, nft.currencyId);
const { tokenName } = metadata || {};
const loading = status === "loading";
Expand All @@ -18,5 +23,4 @@ const CollectionName = ({ nft, fallback }: { nft: ProtoNFT, fallback?: string })
);
};

// $FlowFixMe
export default memo(CollectionName);
export default memo<Props>(CollectionName);
3 changes: 1 addition & 2 deletions src/renderer/screens/nft/Collections/Collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,4 @@ const Collections = ({ account }: Props) => {
);
};

// $FlowFixMe
export default memo(Collections);
export default memo<Props>(Collections);
3 changes: 1 addition & 2 deletions src/renderer/screens/nft/Collections/Row.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,4 @@ const Row = ({ nfts, contract, currencyId, onClick }: Props) => {
);
};

// $FlowFixMe
export default memo(Row);
export default memo<Props>(Row);
3 changes: 1 addition & 2 deletions src/renderer/screens/nft/Gallery/Collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,4 @@ const Collection = () => {
);
};

// $FlowFixMe
export default memo(Collection);
export default memo<{}>(Collection);
3 changes: 1 addition & 2 deletions src/renderer/screens/nft/Gallery/Gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,4 @@ const Gallery = () => {
);
};

// $FlowFixMe
export default memo(Gallery);
export default memo<{}>(Gallery);
3 changes: 1 addition & 2 deletions src/renderer/screens/nft/Gallery/TokensList/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,4 @@ const NftCard = ({ id, mode, account, withContextMenu = false }: Props) => {
);
};

// $FlowFixMe
export default memo(NftCard);
export default memo<Props>(NftCard);
3 changes: 1 addition & 2 deletions src/renderer/screens/nft/Gallery/TokensList/TokensList.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,4 @@ const TokensList = ({ account, isLoading, nfts }: Props) => {
);
};

// $FlowFixMe
export default memo(TokensList);
export default memo<Props>(TokensList);
9 changes: 6 additions & 3 deletions src/renderer/screens/nft/Send/Summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ import Skeleton from "~/renderer/screens/nft/Skeleton";
import { useNftMetadata } from "@ledgerhq/live-common/lib/nft/NftMetadataProvider";
import { centerEllipsis } from "~/renderer/styles/helpers";

const Summary = ({ transaction }: { transaction: Transaction }) => {
type Props = {
transaction: Transaction,
};

const Summary = ({ transaction }: Props) => {
const allNfts = useSelector(getAllNFTs);
const [tokenId] = transaction.tokenIds;
const [contract] = transaction.collections;
Expand Down Expand Up @@ -62,5 +66,4 @@ const Summary = ({ transaction }: { transaction: Transaction }) => {
);
};

// $FlowFixMe
export default memo(Summary);
export default memo<Props>(Summary);

0 comments on commit a326406

Please sign in to comment.