Skip to content

Commit

Permalink
disable ai help if not logged in
Browse files Browse the repository at this point in the history
session will resolve to undefined due to optional chaining which does not equal null so the ai help will not be disabled even if the user is not logged in. with this new change, we're directly comparing the session which will be null if the user is not logged in
  • Loading branch information
JosiasAurel committed May 31, 2024
1 parent b19dc88 commit 9af5802
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/popups-etc/help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default function Help(props: HelpProps) {
showingChat.value ? styles.selected : ""
}`}
disabled={
props.persistenceState?.value.session?.user === null
props.persistenceState?.value.session === null
}
onClick={() => {
showingChat.value = true;
Expand Down

0 comments on commit 9af5802

Please sign in to comment.