Skip to content

Commit 07aa94e

Browse files
authored
Fix LinkCell missing key (#640)
1 parent e82c811 commit 07aa94e

File tree

3 files changed

+837
-824
lines changed

3 files changed

+837
-824
lines changed

Diff for: .npmrc

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
node-linker=hoisted
2-
save-exact=false
31
auto-install-peers=false
2+
lockfile-include-tarball-url=true
3+
save-exact=false
4+
node-linker=hoisted

Diff for: packages/lake/src/components/Cells.tsx

+21-9
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ export const LinkCell = ({
358358
}: LinkCellProps) => {
359359
const atEnd = buttonPosition === "end";
360360

361-
const elements = [
361+
const button = (
362362
<Pressable
363363
style={[styles.button, atEnd && styles.buttonEnd]}
364364
onPress={event => {
@@ -378,18 +378,30 @@ export const LinkCell = ({
378378
)}
379379
</>
380380
)}
381-
</Pressable>,
381+
</Pressable>
382+
);
382383

384+
const text = (
383385
<LakeText numberOfLines={1} color={colors.gray[900]} variant={variant} tooltip={tooltip}>
384386
{children}
385-
</LakeText>,
386-
];
387-
388-
if (atEnd) {
389-
elements.reverse();
390-
}
387+
</LakeText>
388+
);
391389

392-
return <Cell fadeOn={fadeOn}>{elements}</Cell>;
390+
return (
391+
<Cell fadeOn={fadeOn}>
392+
{atEnd ? (
393+
<>
394+
{text}
395+
{button}
396+
</>
397+
) : (
398+
<>
399+
{button}
400+
{text}
401+
</>
402+
)}
403+
</Cell>
404+
);
393405
};
394406

395407
/**

0 commit comments

Comments
 (0)