Skip to content

Commit

Permalink
fix: make the frontend show rep reasons when they're a rep
Browse files Browse the repository at this point in the history
  • Loading branch information
Gobot1234 committed Oct 30, 2024
1 parent de57439 commit d3504bd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const SignInReasonInput: FlowStepComponent = ({ onSecondary, onPrimary })
const [highlightedIndex, setHighlightedIndex] = useState<number>(-1);
const [canContinue, setCanContinue] = useState<boolean>(false);
const hasSessionError = useSignInSessionField("session_errored") ?? false;
const user = useSignInSessionField("user");
const dispatch = useDispatch();
const activeLocation = useSelector((state: AppRootState) => state.signIn.active_location);

Expand All @@ -35,7 +36,7 @@ export const SignInReasonInput: FlowStepComponent = ({ onSecondary, onPrimary })
isLoading: commonReasonsIsLoading,
} = useQuery({
queryKey: ["getCommonReasons", activeLocation],
queryFn: () => getCommonReasons(activeLocation),
queryFn: () => getCommonReasons(activeLocation, user?.is_rep),
});

useEffect(() => {
Expand Down

0 comments on commit d3504bd

Please sign in to comment.