Skip to content

Commit

Permalink
remove unused hook
Browse files Browse the repository at this point in the history
  • Loading branch information
taylordowns2000 committed Aug 23, 2023
1 parent 7350295 commit 55726eb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
10 changes: 1 addition & 9 deletions assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@ import { Socket } from 'phoenix';
import { LiveSocket } from 'phoenix_live_view';

import topbar from '../vendor/topbar';
import {
AssocListChange,
Copy,
Flash,
SubmitViaCtrlS,
Tooltip,
FocusInput,
} from './hooks';
import { AssocListChange, Copy, Flash, SubmitViaCtrlS, Tooltip } from './hooks';
import JobEditor from './job-editor';
import JobEditorResizer from './job-editor-resizer/mount';
import TabSelector from './tab-selector';
Expand All @@ -48,7 +41,6 @@ let Hooks = {
AssocListChange,
Copy,
SubmitViaCtrlS,
FocusInput,
};

// Sets the checkbox to indeterminate state if the element has the
Expand Down
11 changes: 0 additions & 11 deletions assets/js/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,6 @@ export const SubmitViaCtrlS = {
handleEvent: (e: KeyboardEvent) => void;
}>;

export const FocusInput = {
mounted() {
this.el.addEventListener('click', e => {
let input = this.el.closest('.relative').querySelector('input');
if (input) {
input.focus();
}
});
},
};

export const Copy = {
mounted() {
let { to } = this.el.dataset;
Expand Down

0 comments on commit 55726eb

Please sign in to comment.