Skip to content

Commit

Permalink
#23 removing pauseAndContinue() because it is no longer used
Browse files Browse the repository at this point in the history
  • Loading branch information
katrina-cityofdetroit committed Jul 17, 2024
1 parent d4efa8a commit 89c8593
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
6 changes: 3 additions & 3 deletions js/views/03_revenue/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { formatCurrency } from '../../utils/common_utils.js'
import { REVENUE } from '../../init.js'
import Body from '../../components/body/body.js'
import NavButtons from '../../components/nav_buttons/nav_buttons.js'
import { pauseAndContinue } from '../view_logic.js'
import { nextPage } from '../view_logic.js'
import Subtitle from '../../components/header/header.js'
import Modal from '../../components/modal/modal.js'
import Form from '../../components/form/form.js'
Expand All @@ -23,15 +23,15 @@ export function preparePageView(){

export function setUpNavButtons(){
// clicking 'confirm' will also take us to the next page
Prompt.Buttons.Left.addAction(pauseAndContinue);
Prompt.Buttons.Left.addAction(nextPage);
// TODO: allow user to edit revenue here
Modal.Link.add('option2');
handleErrorComment();
}

export function removeButtonEvents(){
// remove event listeners on prompt buttons
Prompt.Buttons.Left.removeAction(pauseAndContinue);
Prompt.Buttons.Left.removeAction(nextPage);
Modal.Link.remove('option2');
}

Expand Down
6 changes: 3 additions & 3 deletions js/views/06_new_initiatives/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import Form from '../../components/form/form.js'
import Table from '../../components/table/table.js'
import Body from '../../components/body/body.js'
import NavButtons from '../../components/nav_buttons/nav_buttons.js'
import { pauseAndContinue } from '../view_logic.js'
import Subtitle from '../../components/header/header.js'
import Sidebar from '../../components/sidebar/sidebar.js'
import { nextPage } from '../view_logic.js'

export function initializePageView() {
// Prepare page view
Expand All @@ -24,7 +24,7 @@ export function initializePageView() {
Prompt.Buttons.Left.updateText('Yes');
Prompt.Buttons.Right.updateText('No');
// clicking 'no new initialitives' will also take us to the next page
Prompt.Buttons.Right.addAction(pauseAndContinue);
Prompt.Buttons.Right.addAction(nextPage);
Prompt.Buttons.Left.addAction(NavButtons.Next.enable);
}

Expand Down Expand Up @@ -111,7 +111,7 @@ export function removeModalLinks(){
}

export function removePromptButtonListeners(){
Prompt.Buttons.Right.removeAction(pauseAndContinue);
Prompt.Buttons.Right.removeAction(nextPage);
Prompt.Buttons.Left.removeAction(NavButtons.Next.enable);
Modal.clear();
}
5 changes: 0 additions & 5 deletions js/views/view_logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,4 @@ export function lastPage(){
// go to that page
visitPage(lastKey);
}
}

export async function pauseAndContinue(){
await pauseExecution(0.1);
nextPage();
}

0 comments on commit 89c8593

Please sign in to comment.