Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes Issue #321 #326

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/src/Auth/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function Login() {
const [password, setPassword] = useState('');
const [invalid, setInvalid] = useState();
const [error, setError] = useState();
const { setUser } = useContext(Context);
const { setUser, setOrganization } = useContext(Context);

const navigate = useNavigate();
const location = useLocation();
Expand All @@ -34,6 +34,7 @@ export default function Login() {
if (res.status === 200) {
// if status returned 200 should set the user in Context
setUser(res.data);
setOrganization(res.data.organization);
// const userData = res.data;
navigate('/');
} else if (res.status === 202) {
Expand Down