Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
buddy-web3 committed Feb 28, 2024
1 parent 88a3e8e commit b26d0bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/hooks/isMobile.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {useState, useEffect} from 'react'

export default function isMobile() {
export default function useIsMobile() {
const mobileWidth = 640
const [windowWidth, setWindowWidth] = useState<number>(0)

Expand Down
4 changes: 2 additions & 2 deletions app/routes/tags.$.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ListTable from '~/components/Table'
import {loader} from '~/routes/tags.all'
import {CategoriesNav} from '~/components/CategoriesNav/Menu'
import type {Tag as TagType} from '~/server-utils/stampy'
import isMobile from '~/hooks/isMobile'
import useIsMobile from '~/hooks/isMobile'
export {loader}

export const sortFuncs = {
Expand All @@ -15,7 +15,7 @@ export const sortFuncs = {
}

export default function Tags() {
const mobile = isMobile()
const mobile = useIsMobile()
const {data} = useLoaderData<ReturnType<typeof loader>>()
const {currentTag, tags} = data
const [selectedTag, setSelectedTag] = useState<TagType | null>(null)
Expand Down

0 comments on commit b26d0bb

Please sign in to comment.