Skip to content

Commit

Permalink
fixup! added feature key navigation user suite
Browse files Browse the repository at this point in the history
  • Loading branch information
agmes4 committed Jan 26, 2024
1 parent 1df0693 commit bec1e08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/resources/js/user-suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ waitForKeyPress((event) => {
// Add your logic here based on the key press
if (event.key === "ArrowRight" ){
const navLinks = document.getElementsByClassName("user-nav-link");
for (let i= 0; i < navLinks.length;i++ ){
for (let i= 0; i < navLinks.length; i++){
const link = navLinks[i] as HTMLLinkElement;
if(link.classList.contains("active")) {
let index = (i + 1)%navLinks.length;
Expand All @@ -37,7 +37,7 @@ waitForKeyPress((event) => {
const navLinks = document.getElementsByClassName("user-nav-link");
let next = false;
console.log(navLinks.length)
for (let i= navLinks.length - 1; i > 0; i--){
for (let i= 0; i < navLinks.length; i++){
const link = navLinks[i] as HTMLLinkElement;
if(link.classList.contains("active")) {
let index = (i - 1) % navLinks.length;
Expand Down

0 comments on commit bec1e08

Please sign in to comment.