Skip to content

Commit

Permalink
Adjust example wording
Browse files Browse the repository at this point in the history
"the today's date" is a bit awkward, so update it to just say "today's date".
  • Loading branch information
toby-brilliant committed Dec 4, 2023
1 parent 7ddf1a1 commit a29bdaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions website/examples/modifiers-today.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import React, { useState } from 'react';
import { DayClickEventHandler, DayPicker } from 'react-day-picker';

export default function App() {
const initialFooter = <p>Try clicking the today’s date.</p>;
const initialFooter = <p>Try clicking today’s date.</p>;
const [footer, setFooter] = useState(initialFooter);

const handleDayClick: DayClickEventHandler = (day, modifiers) => {
if (modifiers.today) {
setFooter(<p>You clicked the today’s date.</p>);
setFooter(<p>You clicked today’s date.</p>);
} else {
setFooter(initialFooter);
}
Expand Down
2 changes: 1 addition & 1 deletion website/test-integration/examples/modifiers-today.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('when another date is clicked', () => {
beforeEach(async () => act(() => user.click(getDayButton(date))));
test('should update the footer', () => {
expect(getTableFooter()).toHaveTextContent(

Check warning on line 41 in website/test-integration/examples/modifiers-today.test.tsx

View workflow job for this annotation

GitHub Actions / lint

Replace `⏎······'Try·clicking·today’s·date.'⏎····` with `'Try·clicking·today’s·date.'`
'Try clicking the today’s date.'
'Try clicking today’s date.'
);
});
});

0 comments on commit a29bdaa

Please sign in to comment.