Skip to content

Commit

Permalink
refactor: Update lunar-phase-card.ts for improved graph display and i…
Browse files Browse the repository at this point in the history
…nteractivity
  • Loading branch information
ngocjohn committed Dec 11, 2024
1 parent 42655a0 commit 620ce6d
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/lunar-phase-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,24 +545,14 @@ export class LunarPhaseCard extends LitElement {
${choose(
graphType,
[
['dynamic', () => dynamicGraph],
['default', () => defaultGraph],
['dynamic', () => dynamicGraph],
],
() => defaultGraph
)}
`;
}

private updateDate(action?: 'next' | 'prev') {
const date = new Date(this._date);
date.setHours(0, 0, 0, 0);
if (action === 'next') {
date.setDate(date.getDate() + 1);
} else if (action === 'prev') {
date.setDate(date.getDate() - 1);
}
this.selectedDate = date;
}

private togglePage = (page: PageType) => {
this._activeCard = this._activeCard === page ? this._defaultCard : page;
Expand Down

0 comments on commit 620ce6d

Please sign in to comment.