From c424cb17f5edd7b646977a244d4276eefa8f10ab Mon Sep 17 00:00:00 2001 From: muhammad-ahmed Date: Tue, 24 Sep 2024 17:13:14 +0800 Subject: [PATCH] fix crashing issue and update translation --- .../ApiTokenTable/__tests__/index.test.tsx | 2 +- .../dashboard/components/ApiTokenTable/index.tsx | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/features/dashboard/components/ApiTokenTable/__tests__/index.test.tsx b/src/features/dashboard/components/ApiTokenTable/__tests__/index.test.tsx index 82908f019..cdc061c4a 100644 --- a/src/features/dashboard/components/ApiTokenTable/__tests__/index.test.tsx +++ b/src/features/dashboard/components/ApiTokenTable/__tests__/index.test.tsx @@ -71,7 +71,7 @@ describe('Api Token Table', () => { }); }); -describe.skip('DeleteTokenDialog', () => { +describe('DeleteTokenDialog', () => { beforeEach(() => { mockUseApiToken.mockImplementation(() => ({ tokens: fakeTokens, diff --git a/src/features/dashboard/components/ApiTokenTable/index.tsx b/src/features/dashboard/components/ApiTokenTable/index.tsx index 851b6bfad..697de1226 100644 --- a/src/features/dashboard/components/ApiTokenTable/index.tsx +++ b/src/features/dashboard/components/ApiTokenTable/index.tsx @@ -2,7 +2,7 @@ import React, { HTMLAttributes } from 'react'; import { Column } from 'react-table'; import { Button, Heading, Text } from '@deriv-com/quill-ui'; import { LabelPairedCirclePlusMdRegularIcon } from '@deriv/quill-icons'; -import Translate from '@docusaurus/Translate'; +import Translate, { translate } from '@docusaurus/Translate'; import { TTokenType } from '@site/src/types'; import { TDashboardTab } from '@site/src/contexts/app-manager/app-manager.context'; import Spinner from '@site/src/components/Spinner'; @@ -23,30 +23,30 @@ export type TTokenColumn = Column; const tableColumns: TTokenColumn[] = [ { - Header: Name, + Header: translate({ message: 'Name' }), accessor: 'display_name', }, { - Header: Account Type, + Header: translate({ message: 'Account Type' }), Cell: AccountTypeCell, }, { - Header: Token, + Header: translate({ message: 'Token' }), accessor: 'token', Cell: ApiTokenCell, }, { - Header: Token scopes, + Header: translate({ message: 'Token scopes' }), accessor: 'scopes', Cell: ScopesCell, }, { - Header: Last used, + Header: translate({ message: 'Last used' }), accessor: 'last_used', Cell: ApiLastUsedCell, }, { - Header: Actions, + Header: translate({ message: 'Actions' }), id: 'actions', accessor: (originalRow) => originalRow.token, Cell: ({ row }) => ,