Skip to content

Commit 32d7f35

Browse files
committed
chore: fix linter warnings and deprecations
1 parent ad0cadf commit 32d7f35

10 files changed

+34
-24
lines changed

package-lock.json

Lines changed: 18 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"iso-639-1": "^3.1.2",
6363
"jsonwebtoken-esm": "^1.0.5",
6464
"lodash": "^4.17.21",
65-
"react-rx": "^4.0.0",
65+
"react-rx": "^4.1.5",
6666
"rxjs": "^7.8.1",
6767
"scroll-into-view-if-needed": "^3.1.0",
6868
"suspend-react": "^0.1.3",
@@ -88,7 +88,7 @@
8888
"eslint-config-sanity": "^7.1.3",
8989
"eslint-plugin-import": "^2.31.0",
9090
"eslint-plugin-prettier": "^5.2.1",
91-
"eslint-plugin-react-hooks": "^4.6.2",
91+
"eslint-plugin-react-hooks": "^5.0.0",
9292
"eslint-plugin-simple-import-sort": "^12.1.1",
9393
"husky": "^9.0.11",
9494
"lint-staged": "^15.2.2",

src/components/InputError.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Box, Dialog, Text} from '@sanity/ui'
2-
import React, {useId} from 'react'
2+
import {useId} from 'react'
33

44
interface Props {
55
error: Error

src/components/MuxLogo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {useId, useMemo} from 'react'
1+
import {useId, useMemo} from 'react'
22

33
// Mapping ids to ensure filter refs are unique, otherwise all Logo instances are hidden if the first SVG is hidden, due to how SVGs deal with relative links and ids
44
const ids = [

src/components/Onboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {PlugIcon} from '@sanity/icons'
22
import {Button, Card, Flex, Grid, Heading, Inline} from '@sanity/ui'
3-
import React, {useCallback} from 'react'
3+
import {useCallback} from 'react'
44

55
import type {SetDialogState} from '../hooks/useDialogState'
66
import MuxLogo from './MuxLogo'

src/components/PlayerActionsMenu.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {
22
EllipsisHorizontalIcon,
3-
EllipsisVerticalIcon,
43
LockIcon,
54
PlugIcon,
65
ResetIcon,
@@ -19,9 +18,9 @@ import {
1918
Popover,
2019
Text,
2120
Tooltip,
22-
useClickOutside,
21+
useClickOutsideEvent,
2322
} from '@sanity/ui'
24-
import React, {memo, useCallback, useEffect, useMemo, useState} from 'react'
23+
import {memo, useCallback, useEffect, useMemo, useState} from 'react'
2524
import {PatchEvent, unset} from 'sanity'
2625
import {styled} from 'styled-components'
2726

@@ -65,9 +64,9 @@ function PlayerActionsMenu(
6564
}
6665
}, [dialogState, open])
6766

68-
useClickOutside(
69-
useCallback(() => setOpen(false), []),
70-
[menuElement]
67+
useClickOutsideEvent(
68+
() => setOpen(false),
69+
() => [menuElement]
7170
)
7271

7372
return (

src/components/SelectAsset.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {useCallback} from 'react'
1+
import {useCallback} from 'react'
22
import {PatchEvent, set, setIfMissing, unset} from 'sanity'
33

44
import type {SetDialogState} from '../hooks/useDialogState'

src/components/SelectSortOptions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {SortIcon} from '@sanity/icons'
22
import {Button, Menu, MenuButton, MenuItem, PopoverProps} from '@sanity/ui'
3-
import React, {useId} from 'react'
3+
import {useId} from 'react'
44

55
import {ASSET_SORT_OPTIONS, SortOption} from '../hooks/useAssets'
66

src/components/UploadPlaceholder.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import {PlugIcon, SearchIcon, UploadIcon} from '@sanity/icons'
22
import {DocumentVideoIcon} from '@sanity/icons'
3-
import {Box, Button, Card, Flex, Inline, Text} from '@sanity/ui'
4-
import React, {useCallback} from 'react'
5-
import {styled} from 'styled-components'
3+
import {Button, Card, Flex, Inline, Text} from '@sanity/ui'
4+
import {useCallback} from 'react'
65

76
import type {SetDialogState} from '../hooks/useDialogState'
87
import {FileInputButton, type FileInputButtonProps} from './FileInputButton'

src/components/VideoThumbnail.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {ErrorOutlineIcon} from '@sanity/icons'
22
import {Box, Card, CardTone, Spinner, Stack, Text} from '@sanity/ui'
3-
import React, {useMemo, useState} from 'react'
3+
import {useMemo, useState} from 'react'
44
import {styled} from 'styled-components'
55

66
import {useClient} from '../hooks/useClient'
@@ -46,7 +46,7 @@ export default function VideoThumbnail({
4646
if (status !== 'error') setStatus('error')
4747
return undefined
4848
}
49-
}, [asset, client, width, status, setStatus])
49+
}, [asset, client, posterWidth, status])
5050

5151
function handleLoad() {
5252
setStatus('loaded')

0 commit comments

Comments
 (0)