mirror of
https://github.com/makeplane/plane.git
synced 2025-12-23 15:19:37 +01: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;
|