Skip to content

Commit 62651a0

Browse files
committed
fix: consistent comments
1 parent 39a65a6 commit 62651a0

File tree

2 files changed

+8
-20
lines changed

2 files changed

+8
-20
lines changed

src/components/Attachments/AttachmentCarousel/Pager/AttachmentCarouselPagerContext.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,15 @@ import {createContext} from 'react';
33
import type PagerView from 'react-native-pager-view';
44
import type {SharedValue} from 'react-native-reanimated';
55

6-
/**
7-
* The pager items array is used within the pager to render and navigate between the images
8-
*/
6+
/** The pager items array is used within the pager to render and navigate between the images */
97
type AttachmentCarouselPagerItems = {
108
/** The source of the image is used to identify each attachment/page in the pager */
119
source: string;
1210

1311
/** The index of the pager item determines the order of the images in the pager */
1412
index: number;
1513

16-
/**
17-
* The active state of the pager item determines whether the image is currently transformable with pinch, pan and tap gestures
18-
*/
14+
/** The active state of the pager item determines whether the image is currently transformable with pinch, pan and tap gestures */
1915
isActive: boolean;
2016
};
2117

src/components/Attachments/AttachmentCarousel/Pager/index.tsx

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,16 @@ type Attachment = {
2525
};
2626

2727
type AttachmentCarouselPagerProps = {
28-
/**
29-
* The attachments to be rendered in the pager.
30-
*/
28+
/** The attachments to be rendered in the pager. */
3129
items: Attachment[];
3230

33-
/**
34-
* The source (URL) of the currently active attachment.
35-
*/
31+
/** The source (URL) of the currently active attachment. */
3632
activeSource: string;
3733

38-
/**
39-
* The index of the initial page to be rendered.
40-
*/
34+
/** The index of the initial page to be rendered. */
4135
initialPage: number;
4236

43-
/**
44-
* A callback to be called when the page is changed.
45-
*/
37+
/** A callback to be called when the page is changed. */
4638
onPageSelected: () => void;
4739

4840
/**
@@ -147,7 +139,7 @@ function AttachmentCarouselPager({items, activeSource, initialPage, onPageSelect
147139
[],
148140
);
149141

150-
const Content = useMemo(
142+
const carouselItems = useMemo(
151143
() =>
152144
items.map((item, index) => (
153145
<View
@@ -178,7 +170,7 @@ function AttachmentCarouselPager({items, activeSource, initialPage, onPageSelect
178170
animatedProps={animatedProps}
179171
ref={pagerRef}
180172
>
181-
{Content}
173+
{carouselItems}
182174
</AnimatedPagerView>
183175
</AttachmentCarouselPagerContext.Provider>
184176
);

0 commit comments

Comments
 (0)