How can I make sure the code gets run on the client-side??!
I would assume that the code is getting fired on the server side and that the error occurs when it is trying to access the window. Thank you in advance!

import { useEffect, useState } from "preact/hooks";
export default function Callback() {
useEffect(() => {
const hashParam = window.location.hash.substring(1);
console.log(`Param: ${hashParam}`);
}, []);
return (
<div>
....
</div>
);
}