mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
15 lines
290 B
TypeScript
15 lines
290 B
TypeScript
import { useEffect, useState } from "react";
|
|
|
|
const useURLHash = () => {
|
|
const [hashValue, setHashValue] = useState<string>();
|
|
|
|
useEffect(() => {
|
|
const hash = window.location.hash?.split("#")[1];
|
|
setHashValue(hash);
|
|
}, []);
|
|
|
|
return hashValue;
|
|
};
|
|
|
|
export default useURLHash;
|