Skip to content

Commit bfa721f

Browse files
guesungkimyouknow
andauthored
docs: fix duplicate code block syntax in example sections (#357)
Co-authored-by: 김윤호 yunho <kimyouknow@naver.com> Co-authored-by: kimyouknow <kimyouknow@toss.im>
1 parent 7f7263b commit bfa721f

5 files changed

Lines changed: 4 additions & 36 deletions

File tree

packages/core/src/hooks/useMap/useMap.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,14 @@ function useMap(initialState: MapOrEntries<K, V>): UseMapReturn<K, V>;
2727

2828
## Example
2929

30-
````tsx
3130
```tsx
3231
const [userMap, actions] = useMap<string, User>([
33-
['user1', { name: 'John', age: 30 }]
32+
['user1', { name: 'John', age: 30 }],
3433
]);
3534

3635
// Using values from the Map
3736
const user1 = userMap.get('user1');
3837

3938
// Updating the Map
4039
actions.set('user2', { name: 'Jane', age: 25 });
41-
````
42-
43-
```
44-
4540
```

packages/mobile/src/hooks/useBodyScrollLock/useBodyScrollLock.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,9 @@ This hook does not return anything.
1414

1515
## Example
1616

17-
````tsx
1817
```tsx
1918
function Modal() {
2019
useBodyScrollLock();
2120
return <div className="modal">Modal content</div>;
2221
}
23-
````
24-
25-
```
26-
2722
```

packages/mobile/src/hooks/useNetworkStatus/useNetworkStatus.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,15 @@ function useNetworkStatus(): NetworkStatus;
2727

2828
## Example
2929

30-
````tsx
31-
```tsxp
30+
```tsx
3231
function AdaptiveImage() {
3332
const { effectiveType, saveData } = useNetworkStatus();
3433

3534
// Determine quality based on your app's needs
3635
const useHighQuality = effectiveType === '4g' && !saveData;
3736

3837
return (
39-
<img
40-
src={useHighQuality ? 'high-res.jpg' : 'low-res.jpg'}
41-
alt="Content"
42-
/>
38+
<img src={useHighQuality ? 'high-res.jpg' : 'low-res.jpg'} alt="Content" />
4339
);
4440
}
45-
````
46-
47-
```
48-
4941
```

packages/mobile/src/hooks/usePageVisibility/usePageVisibility.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ function usePageVisibility(): PageVisibility;
2727

2828
## Example
2929

30-
````tsx
3130
```tsx
3231
function VideoPlayer() {
3332
const { isVisible } = usePageVisibility();
@@ -44,8 +43,4 @@ function VideoPlayer() {
4443

4544
return <video ref={videoRef} src="video.mp4" />;
4645
}
47-
````
48-
49-
```
50-
5146
```

packages/mobile/src/hooks/useScrollDirection/useScrollDirection.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,13 @@ function useScrollDirection(): void;
2525

2626
## Example
2727

28-
````tsx
2928
```tsx
3029
function Header() {
3130
const { direction, position } = useScrollDirection();
3231

3332
// Hide header on scroll down
3433
const isHidden = direction === 'down' && position > 100;
3534

36-
return (
37-
<header className={isHidden ? 'hidden' : 'visible'}>
38-
My Header
39-
</header>
40-
);
35+
return <header className={isHidden ? 'hidden' : 'visible'}>My Header</header>;
4136
}
42-
````
43-
44-
```
45-
4637
```

0 commit comments

Comments
 (0)