Skip to content

Commit

Permalink
fix: Optimize reuse on Row and Column helpers (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
chiefcll authored Oct 7, 2024
1 parent 175a604 commit 3ef23a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions packages/solid/components/Column/Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ import { chainFunctions } from '../../utils/chainFunctions.js';
import type { ColumnProps } from './Column.types.js';
import styles from './Column.styles.js';

const onUp = handleNavigation('up');
const onDown = handleNavigation('down');
const scroll = withScrolling(false);
const Column: Component<ColumnProps> = props => {
const onUp = handleNavigation('up');
const onDown = handleNavigation('down');
const scroll = withScrolling(false);

return (
<View
{...props}
Expand Down
8 changes: 4 additions & 4 deletions packages/solid/components/Row/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import { withScrolling } from '../../utils/withScrolling.js';
import styles from './Row.styles.js';
import type { RowProps } from './Row.types.js';

const Row: Component<RowProps> = props => {
const onLeft = handleNavigation('left');
const onRight = handleNavigation('right');
const scroll = withScrolling(true);
const onLeft = handleNavigation('left');
const onRight = handleNavigation('right');
const scroll = withScrolling(true);

const Row: Component<RowProps> = props => {
return (
<View
{...props}
Expand Down

0 comments on commit 3ef23a6

Please sign in to comment.