Skip to content

Commit

Permalink
Add 403 code to doors redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
user890104 committed Sep 1, 2023
1 parent f9c88a6 commit fc8c8f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/Doors.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const Doors = () => {
</Card>
</Col>}
</>}
{isError && (error.status === 401 ? <Navigate to="/login" /> : <ErrorMessage error={error} />)}
{isError && ([401, 403].includes(error.status) ? <Navigate to="/login" /> : <ErrorMessage error={error} />)}
</Row>);
};

Expand Down

0 comments on commit fc8c8f2

Please sign in to comment.