@@ -3,26 +3,20 @@ import React from 'react'
import styles from './key-for-search.module.scss'
-interface KeyForSearchProps {
- userAgent: string | null
-}
-
-export const KeyForSearch = ({ userAgent }: KeyForSearchProps) => {
- if (userAgent === null) {
- return null
- }
-
+export const KeyForSearch = () => {
const checkType = () => {
- if (userAgent.includes('Windows')) {
- return 'Ctrl + F'
+ if (navigator.userAgent && !navigator.userAgent.includes('Windows')) {
+ return '⌘+F'
} else {
- return '⌥+F'
+ return 'Ctrl + F'
}
}
return (
- {checkType()}
+
+ {checkType()}
+
)
}
@@ -30,10 +30,10 @@ export const Search = ({ device }: SearchProps) => {
visibleMediaLinks,
staticLinks
)
-
- useEffect(() => {
- console.log(links)
- }, [links])
+
+ useEffect(() => {
+ console.log(links)
+ }, [links])
const { search, setSearch, searchOpen, setSearchOpen, searchRef, filteredLinks } =
useNavigationSearchModel(links)
@@ -137,13 +137,7 @@ export const Search = ({ device }: SearchProps) => {
}}
/>
),
- endAdornment: (
-
- ),
+ endAdornment: ,
}}
/>
)}