Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit c006490

Browse files
authored
Merge pull request #207 from sanjam-deriv/hidetokens
2 parents dddbcfe + 6191fe2 commit c006490

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/features/dashboard/components/ApiTokenTable/table.token.cell.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import React, { useEffect, useState } from 'react';
22
import { TTokenType } from '@site/src/types';
33
import { CellProps } from 'react-table';
44
import styles from './token-cell.module.scss';
@@ -9,6 +9,10 @@ const ApiTokenCell = ({ cell }: React.PropsWithChildren<CellProps<TTokenType, st
99
const has_admin_scope = cell.row?.original?.scopes?.includes('admin');
1010
const token = cell.value;
1111

12+
useEffect(() => {
13+
setIsHidingToken(true);
14+
}, [token]);
15+
1216
const HiddenToken = () => {
1317
const TOKEN_LENGTH = 14;
1418
const element_array = [];

0 commit comments

Comments
 (0)