Skip to content

Commit

Permalink
🚧 fix(typo): Moment import.
Browse files Browse the repository at this point in the history
  • Loading branch information
mxchinegod committed Aug 27, 2023
1 parent 2e93333 commit 714e8a2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pages/Welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
Modal,
AutoComplete,
} from 'antd';
import type { Dayjs } from 'dayjs';
import {
ShareAltOutlined,
ClockCircleOutlined,
Expand All @@ -29,7 +30,7 @@ import { everything } from '@/services/altdata/newsapi';
import { schedule } from '@/services/altdata/reserve';
import { summarize } from '@/services/mldata/mlapi';
import moment from 'moment';
moment.locale('end');
moment.locale('en');
import dayjs from 'dayjs';
dayjs.locale('en');

Expand Down Expand Up @@ -83,7 +84,7 @@ const Welcome: React.FC = () => {
});
};

const getListData = (value: dayjs) => {
const getListData = (value: Dayjs) => {
let listData;
events.forEach((item) => {
if (item.month === value.format('YYYY-MM') && item.days === value.date().toString()) {
Expand All @@ -93,7 +94,7 @@ const Welcome: React.FC = () => {
return listData || [];
};

const dateCellRender = (value: dayjs) => {
const dateCellRender = (value: Dayjs) => {
const listData = getListData(value);
return (
<ul className="events">
Expand Down

0 comments on commit 714e8a2

Please sign in to comment.