Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jakzaizzat committed Apr 19, 2024
1 parent ea7bf71 commit 22d1022
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 34 deletions.
1 change: 0 additions & 1 deletion apps/mobile/src/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ export function Button({
buttonVariants[colorScheme][disabled ? 'disabled' : variant][active ? 'active' : 'inactive'];

const sizeVariants: { [size in Size]: string } = {
// TODO: check regression
xs: 'h-[24] px-4',
sm: 'h-[36] px-4',
md: 'h-[44] px-6',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import { GalleryEditorRowFragment$key } from '~/generated/GalleryEditorRowFragme
import { GalleryTouchableOpacity } from '../GalleryTouchableOpacity';
import { GalleryEditorActiveActions } from './GalleryEditorActiveActions';
import { GalleryEditorTokenPreview } from './GalleryEditorTokenPreview';

const horizontalRowPadding = 16;
const inBetweenColumnPadding = 0;
import { horizontalRowPadding, inBetweenColumnPadding } from './utils';

type Props = {
sectionId: string;
Expand Down
54 changes: 26 additions & 28 deletions apps/mobile/src/components/GalleryEditor/SortableRowList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,33 +61,31 @@ export function SortableRowList({ rows, sectionId, queryRef, onDragEnd }: Props)
}, [rowOffsets]);

return (
<>
<View
className="relative"
style={[
{
height: containerHeight,
top: 0,
left: 0,
right: 0,
},
]}
>
{rows.map((row, index) => {
return (
<SortableRow
key={`${row.id}`}
index={index}
positions={positions}
animatedIndex={animatedIndex}
itemHeights={itemHeights}
onDragEnd={onDragEnd}
>
<GalleryEditorRow sectionId={sectionId} row={row} queryRef={query} />
</SortableRow>
);
})}
</View>
</>
<View
className="relative"
style={[
{
height: containerHeight,
top: 0,
left: 0,
right: 0,
},
]}
>
{rows.map((row, index) => {
return (
<SortableRow
key={`${row.id}`}
index={index}
positions={positions}
animatedIndex={animatedIndex}
itemHeights={itemHeights}
onDragEnd={onDragEnd}
>
<GalleryEditorRow sectionId={sectionId} row={row} queryRef={query} />
</SortableRow>
);
})}
</View>
);
}
4 changes: 2 additions & 2 deletions apps/mobile/src/components/GalleryEditor/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ type Offset = {
height: number;
};

const horizontalRowPadding = 16;
const inBetweenColumnPadding = 0;
export const horizontalRowPadding = 16;
export const inBetweenColumnPadding = 0;

export function getRowHeight(row: StagedRow, screenDimensionsWidth: number) {
const column = row.columns;
Expand Down

0 comments on commit 22d1022

Please sign in to comment.