Skip to content

Commit 21f4512

Browse files
committed
PR feedback
1 parent 46a6b44 commit 21f4512

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src-ts/tools/learn/learn-lib/functions/learn.factory.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ export interface LearnResponseModel {
99
export function create<T extends LearnResponseModel>(item: T): T {
1010

1111
if (typeof item?.createdAt === 'string') {
12-
set(item, 'createdAt', new Date(item.createdAt))
12+
item.createdAt = new Date(item.createdAt)
1313
}
1414

1515
if (typeof item?.updatedAt === 'string') {
16-
set(item, 'updatedAt', new Date(item.updatedAt))
16+
item.updatedAt = new Date(item.updatedAt)
1717
}
1818

1919
if (typeof item?.publishedAt === 'string') {
20-
set(item, 'publishedAt', new Date(item.publishedAt))
20+
item.publishedAt = new Date(item.publishedAt)
2121
}
2222

2323
return item

src-ts/tools/learn/welcome/progress-block/progress-action/ProgressAction.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const ProgressAction: FC<ProgressActionProps> = (props: ProgressActionProps) =>
4343
const certificationsById: { [key: string]: LearnCertification } = useMemo(() => (
4444
props.allCertifications
4545
.reduce((certifs, certificate) => {
46-
set(certifs, [certificate.id], certificate)
46+
certifs[certificate.id] = certificate
4747
return certifs
4848
}, {} as unknown as { [key: string]: LearnCertification })
4949
), [props.allCertifications])

src-ts/utils/settings/account/Account.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable jsx-a11y/tabindex-no-positive */
12
import { Dispatch, FC, SetStateAction, useCallback, useContext, useState } from 'react'
23
import Modal from 'react-responsive-modal'
34

@@ -70,7 +71,7 @@ const Account: FC<{}> = () => {
7071
<Button
7172
label='edit name'
7273
onClick={toggleEditName}
73-
tabIndex={-1}
74+
tabIndex={1}
7475
buttonStyle='secondary'
7576
/>
7677
</Card>
@@ -93,7 +94,7 @@ const Account: FC<{}> = () => {
9394
<Button
9495
label='change password'
9596
onClick={toggleChangePassword}
96-
tabIndex={-1}
97+
tabIndex={2}
9798
buttonStyle='secondary'
9899
/>
99100
</Card>

0 commit comments

Comments
 (0)