Skip to content

Commit b7b2628

Browse files
committed
test: moment js
1 parent 74e28af commit b7b2628

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"clsx": "^2.1.1",
2323
"dayjs": "^1.11.12",
2424
"framer-motion": "^11.3.8",
25+
"moment": "^2.30.1",
2526
"next": "14.2.4",
2627
"next-image-zoom": "^1.1.7",
2728
"next-qrcode": "^2.5.1",

pnpm-lock.yaml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/rpkm/staff/home/page.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { CheckIn } from '@/types/checkIn';
1212
import { FRESHYNIGHT_EVENT, RPKM_DAY_1, RPKM_DAY_2 } from '@/utils/date';
1313
import dayjs from 'dayjs';
1414
import StudentCodeInput from '@/components/rpkm/staff/home/qrscanner/StudentCodeInput';
15+
import moment from 'moment';
1516

1617
function Page() {
1718
const [eventText, setEventText] = useState<string>('');
@@ -87,7 +88,12 @@ function Page() {
8788
<div>
8889
ผู้ใช้สแกน QR-code นี้แล้ว
8990
<br />
90-
{`เมื่อเวลา ${date.format('HH:mm')} น.`}
91+
<div>{newCheckInData.checkIn.timestamp}</div>
92+
<div> {`เมื่อเวลา ${date.format('HH:mm')} น.`}</div>
93+
<div>
94+
{' '}
95+
{`momentjs: ${moment(newCheckInData.checkIn.timestamp).format('HH:mm')} น.`}
96+
</div>
9197
</div>
9298
);
9399
setErrorTopic('Already taken!');

0 commit comments

Comments
 (0)