From f25f7057a26446a266e0b62da773b5d60f2c2cba Mon Sep 17 00:00:00 2001 From: Daoud Clarke Date: Mon, 30 Oct 2023 16:44:15 +0000 Subject: [PATCH] Remove unused code --- front-end/src/components/app.js | 33 ------------------- front-end/src/components/molecules/result.js | 24 -------------- front-end/src/components/organisms/results.js | 20 ----------- front-end/src/index.js | 1 - 4 files changed, 78 deletions(-) delete mode 100644 front-end/src/components/app.js diff --git a/front-end/src/components/app.js b/front-end/src/components/app.js deleted file mode 100644 index 91ef881..0000000 --- a/front-end/src/components/app.js +++ /dev/null @@ -1,33 +0,0 @@ -import define from '../utils/define.js'; -import addResult from "./molecules/add-result.js"; -import save from "./organisms/save.js"; - -const template = () => /*html*/` -
- -
Login Sign up
-
- mwmbl logo - MWMBL -
- -
-
- -
-
- -`; - -export default define('app', class extends HTMLElement { - constructor() { - super(); - this.__setup(); - } - - __setup() { - this.innerHTML = template(); - } -}); \ No newline at end of file diff --git a/front-end/src/components/molecules/result.js b/front-end/src/components/molecules/result.js index a5ff9b1..9ab38ee 100644 --- a/front-end/src/components/molecules/result.js +++ b/front-end/src/components/molecules/result.js @@ -1,26 +1,7 @@ import define from '../../utils/define.js'; import escapeString from '../../utils/escapeString.js'; import { globalBus } from '../../utils/events.js'; -import deleteButton from "./delete-button.js"; -import validateButton from "./validate-button.js"; -import addButton from "./add-button.js"; -// const template = ({ data }) => /*html*/` -//
-//
-// -// -// -//
-// -//
-// `; export default define('result', class extends HTMLLIElement { constructor() { @@ -30,11 +11,6 @@ export default define('result', class extends HTMLLIElement { } __setup() { - // this.innerHTML = template({ data: { - // url: this.dataset.url, - // title: this.__handleBold(JSON.parse(this.dataset.title)), - // extract: this.__handleBold(JSON.parse(this.dataset.extract)) - // }}); this.__events(); } diff --git a/front-end/src/components/organisms/results.js b/front-end/src/components/organisms/results.js index ce97295..7a0e6b4 100644 --- a/front-end/src/components/organisms/results.js +++ b/front-end/src/components/organisms/results.js @@ -1,26 +1,11 @@ -import define from '../../utils/define.js'; import {globalBus} from '../../utils/events.js'; -// Components -import result from '../molecules/result.js'; -import emptyResult from '../molecules/empty-result.js'; -import home from './home.js'; -import escapeString from '../../utils/escapeString.js'; - -// const template = () => /*html*/` -// -// `; - document.body.addEventListener('htmx:load', function(evt) { }); -// export default define('results', class extends HTMLElement { - class ResultsHandler { constructor() { this.results = null; @@ -30,15 +15,11 @@ class ResultsHandler { } __setup() { - // this.innerHTML = template(); this.__events(); } __events() { document.body.addEventListener('htmx:load', e => { - // }); - // - // globalBus.on('search', (e) => { this.results = document.querySelector('.results'); // Allow the user to re-order search results @@ -204,4 +185,3 @@ class ResultsHandler { } const resultsHandler = new ResultsHandler(); - diff --git a/front-end/src/index.js b/front-end/src/index.js index 72edc8a..34cd8cb 100644 --- a/front-end/src/index.js +++ b/front-end/src/index.js @@ -14,7 +14,6 @@ if (!redirected) { // Load components only after redirects are checked. - // import('./components/app.js'); import('./components/login.js'); import('./components/register.js'); import("./components/organisms/search-bar.js");