Skip to content

Commit

Permalink
remove: 이벤트 리스너 유틸 삭제"
Browse files Browse the repository at this point in the history
  • Loading branch information
feb-dain committed Mar 19, 2023
1 parent cf49660 commit ae1e790
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
3 changes: 1 addition & 2 deletions src/components/headerHandler.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { executeEventListener } from "../utils/eventListener";
import { $ } from "../utils/selector";
import { movieApi, resetMoviesAndPages } from "../domain/movieApi";

Expand All @@ -20,7 +19,7 @@ export const onSubmitSearchBox = () => {
};

export const onClickLogo = () => {
executeEventListener($("#logo"), "click", () => {
$("#logo").addEventListener("click", () => {
resetMoviesAndPages();
movieApi.last_keyword = "";

Expand Down
3 changes: 1 addition & 2 deletions src/components/movieListHandler.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { movieApi } from "../domain/movieApi";
import { executeEventListener } from "../utils/eventListener";
import { $ } from "../utils/selector";
import MovieList from "./MovieList";

export const onClickMoreButton = () => {
executeEventListener($("#more-button"), "click", async () => {
$("#more-button").addEventListener("click", async () => {
$(".item-list").insertAdjacentHTML("beforeend", renderSkeletons());

movieApi.page += 1;
Expand Down
11 changes: 0 additions & 11 deletions src/utils/eventListener.ts

This file was deleted.

0 comments on commit ae1e790

Please sign in to comment.