Skip to content

Commit

Permalink
fix: lint correction
Browse files Browse the repository at this point in the history
  • Loading branch information
RamyEB committed Aug 16, 2024
1 parent 5d4a12f commit a80e43c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default function ManifestItem({
<Text variant="large" color={color} numberOfLines={1} fontWeight="semiBold">
{manifest.name}
</Text>
<Flex flexDirection="row" alignItems={"center"} >
<Flex flexDirection="row" alignItems={"center"}>
{manifest.branch !== "stable" && (
<Label
text={t(`platform.catalog.branch.${manifest.branch}`, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import { AppManifest } from "@ledgerhq/live-common/wallet-api/types";
export default function MinimalAppCard({
item,
onPress,
disabled
disabled,
}: {
item: AppManifest;
onPress: () => void;
disabled?: boolean;
}) {
return (
<TouchableOpacity disabled={ disabled } onPress={onPress}>
<TouchableOpacity disabled={disabled} onPress={onPress}>
<Flex rowGap={6} marginRight={3} width={70} alignItems={"center"}>
<AppIcon isDisabled={disabled} size={48} name={item.name} icon={item.icon} />
<Text numberOfLines={1}>{item.name}</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ type PropRenderItem = {
extraData?: (manifest: AppManifest) => void;
};

const identityFn = (item: AppManifest) => item.id

const identityFn = (item: AppManifest) => item.id;

export default function HorizontalList({
title,
Expand All @@ -30,21 +29,17 @@ export default function HorizontalList({
extraData,
testID,
}: Props) {
const renderItem = useCallback(({ item, extraData = () => {} }: PropRenderItem) => {
const disabled = item.branch === "soon";
const handlePress = () => {
if (!disabled) {
extraData(item);
}
};

return <MinimalAppCard key={item.id} disabled={disabled} item={item} onPress={handlePress} />;
}, []);

const renderItem = useCallback(
({ item, extraData = () => {} }: PropRenderItem) => {
const disabled = item.branch === "soon"
const handlePress = () => {
if (!disabled) {
extraData(item);
}
};

return <MinimalAppCard key={item.id} disabled={disabled} item={item} onPress={handlePress} />;
},
[]
);

return (
<>
<Text mt={2} mb={5} numberOfLines={1} variant="h5" mx={5} accessibilityRole="header">
Expand All @@ -60,7 +55,7 @@ export default function HorizontalList({
ListFooterComponent={
isLoading ? (
<Flex marginRight={4} justifyContent={"center"} paddingTop={3}>
<InfiniteLoader size={30} />
<InfiniteLoader size={30} />
</Flex>
) : null
}
Expand Down

0 comments on commit a80e43c

Please sign in to comment.