mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-05 15:30:48 +00:00
initial commit
This commit is contained in:
commit
f6dd426830
1145 changed files with 102834 additions and 0 deletions
17
package/@stackframe/stack-shared/dist/esm/hooks/use-hash.js
vendored
Normal file
17
package/@stackframe/stack-shared/dist/esm/hooks/use-hash.js
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// src/hooks/use-hash.tsx
|
||||
import { useSyncExternalStore } from "react";
|
||||
import { suspendIfSsr } from "../utils/react";
|
||||
var useHash = () => {
|
||||
suspendIfSsr("useHash");
|
||||
return useSyncExternalStore(
|
||||
(onChange) => {
|
||||
const interval = setInterval(() => onChange(), 10);
|
||||
return () => clearInterval(interval);
|
||||
},
|
||||
() => window.location.hash.substring(1)
|
||||
);
|
||||
};
|
||||
export {
|
||||
useHash
|
||||
};
|
||||
//# sourceMappingURL=use-hash.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue