Skip to content

Commit

Permalink
fix: location hash in ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
MaGOs92 committed Aug 7, 2024
1 parent 83483a3 commit 83027f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useHash.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState, useEffect } from 'react'

export const useHash = () => {
const [hash, setHash] = useState(window.location.hash)
const [hash, setHash] = useState('')
useEffect(() => {
const onHashChange = () => {
setHash(window.location.hash)
Expand Down

0 comments on commit 83027f9

Please sign in to comment.