Project Init

This commit is contained in:
Muluhabt
2026-05-29 15:23:46 +03:00
commit 2fbc557aac
67387 changed files with 6063341 additions and 0 deletions

33
node_modules/@mantine/hooks/cjs/use-hash/use-hash.cjs generated vendored Normal file
View File

@@ -0,0 +1,33 @@
'use client';
'use strict';
var React = require('react');
var useWindowEvent = require('../use-window-event/use-window-event.cjs');
function useHash({
getInitialValueInEffect = true
} = {}) {
const [hash, setHash] = React.useState(
getInitialValueInEffect ? "" : window.location.hash || ""
);
const setHashHandler = (value) => {
const valueWithHash = value.startsWith("#") ? value : `#${value}`;
window.location.hash = valueWithHash;
setHash(valueWithHash);
};
useWindowEvent.useWindowEvent("hashchange", () => {
const newHash = window.location.hash;
if (hash !== newHash) {
setHash(newHash);
}
});
React.useEffect(() => {
if (getInitialValueInEffect) {
setHash(window.location.hash);
}
}, []);
return [hash, setHashHandler];
}
exports.useHash = useHash;
//# sourceMappingURL=use-hash.cjs.map