Skip to content

Commit

Permalink
fix: React Hook "useSession" is called conditionally. React Hooks mus…
Browse files Browse the repository at this point in the history
…t be called in the exact same order in every component render. react-hooks/rules-of-hooks
  • Loading branch information
patrickwebsdev committed Nov 9, 2024
1 parent d56e106 commit 9dd86f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/OfferHelp.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export default function OfferHelp({
sessionProp,
}) {
const { towns } = useTowns();
const session = sessionProp || useSession();
const sessionProvider = useSession();
const session = sessionProp || sessionProvider;

const router = useRouter();

Expand Down

0 comments on commit 9dd86f9

Please sign in to comment.