Skip to content

Commit

Permalink
fix left button logic (#718)
Browse files Browse the repository at this point in the history
* fix left button logic

* clean up console log
  • Loading branch information
Marvel-Ib authored Sep 19, 2023
1 parent b9b8689 commit 3c5e8e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/app/src/pages/tickets/TicketModalPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const TicketModalPage = observer(({ setConnectPerson }: Props) => {
const prevArrHandler = () => {
if (activeListIndex === 0) return;

const { person, body } = main.peopleWanteds[activeListIndex];
const { person, body } = main.peopleWanteds[activeListIndex-1];
if (person && body) {
history.replace({
pathname: history?.location?.pathname,
Expand All @@ -72,6 +72,7 @@ export const TicketModalPage = observer(({ setConnectPerson }: Props) => {
}
};
const nextArrHandler = () => {

if (activeListIndex + 1 > main.peopleWanteds?.length) return;

const { person, body } = main.peopleWanteds[activeListIndex + 1];
Expand Down

0 comments on commit 3c5e8e0

Please sign in to comment.