mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-29 12:10:24 +00:00
Initial commit of eigent-main
This commit is contained in:
commit
723df5a03e
1144 changed files with 103478 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