Skip to content

Commit

Permalink
build first
Browse files Browse the repository at this point in the history
  • Loading branch information
Xlebabutti committed Apr 10, 2024
1 parent 27b7165 commit e1cb291
Show file tree
Hide file tree
Showing 31 changed files with 899 additions and 26 deletions.
31 changes: 19 additions & 12 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import {
LoginPageDataErrorLoginPassword,
LoginPageDataRegistration,
} from './src/pages/login/login-data';
import { SelectorData } from './src/pages/modules/modules-data';

import {
ProfileModalFileError,
ProfileModalFileErrorLoad,
Expand Down Expand Up @@ -38,20 +40,25 @@ const pages = {

Messenger: [Pages.Messenger],
MessengerToChoose: [Pages.MessengerToChoose],

Error404: [Pages.page404],
Error505: [Pages.page505],

Home: [Pages.Home],

OtherModules: [Pages.Modules, SelectorData],
};

document.addEventListener('DOMContentLoaded', () =>
navigateOnClient(pages, 'Messenger'),
navigateOnClient(pages, 'Home'),
);

// document.addEventListener('click', (event) => {
// const page = event.target.getAttribute('page');
// console.log(page, 'page');
// if (page) {
// console.log(page, 'in main');
// navigateOnClient(page);

// event.preventDefault();
// event.stopImmediatePropagation();
// }
// });
document.addEventListener('click', (event) => {
const page = event.target.getAttribute('page');
if (page) {
navigateOnClient(pages, page);

event.preventDefault();
event.stopImmediatePropagation();
}
});
Loading

0 comments on commit e1cb291

Please sign in to comment.