Skip to content

Commit

Permalink
button fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ssftvyn committed May 22, 2024
1 parent a25c51c commit f6ff85e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ export const SortType = {
};

export const NoPointsTextType = {
[FilterType.EVERYTHING]: 'Click New Event to create your first point',
[FilterType.PAST]: 'There are no past events now',
[FilterType.PRESENT]: 'There are no present events now',
[FilterType.FUTURE]: 'There are no future events now'
[FilterType.EVERYTHING]: 'click new event to create your first point',
[FilterType.PAST]: 'there are no past events now',
[FilterType.PRESENT]: 'there are no present events now',
[FilterType.FUTURE]: 'there are no future events now'
};

export const Mode = {
Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import PointsApiService from './api-service/points-api';
import DestinationsApiService from './api-service/destinations-api';
import OffersApiService from './api-service/offers-api';

const AUTHORIZATION = 'Basic 2PV6hj7Xi2';
const AUTHORIZATION = 'Basic hs0NCvhAEP';
const END_POINT = 'https://21.objects.htmlacademy.pro/big-trip';

const tripContainer = document.querySelector('.trip-events');
Expand Down
8 changes: 8 additions & 0 deletions src/view/new-point-button-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,13 @@ export default class NewPointButtonView extends AbstractView {
#clickHandler = (event) => {
event.preventDefault();
this.#handleClick();
this.#hideNoPointsText();
};

#hideNoPointsText = () => {
const noPointsTextElement = document.querySelector('.trip-events__msg');
if (noPointsTextElement) {
noPointsTextElement.style.display = 'none';
}
};
}
1 change: 0 additions & 1 deletion src/view/no-point-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ export default class NoPointView extends AbstractView {
}
}


0 comments on commit f6ff85e

Please sign in to comment.