-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f37bd69
commit 0022f46
Showing
7 changed files
with
97 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
41 changes: 21 additions & 20 deletions
41
frontend/src/pages/users/UserFingerprintsList/UserFingerprint.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,35 @@ | ||
import { FC } from 'react'; | ||
import { Button } from 'react-bootstrap'; | ||
import { FC } from "react"; | ||
import { Button } from "react-bootstrap"; | ||
import { FingerprintAlgorithm } from "src/graphql"; | ||
import { Icon } from "src/components/fragments"; | ||
import { formatDuration } from "src/utils"; | ||
import { | ||
faTimesCircle, | ||
} from "@fortawesome/free-solid-svg-icons"; | ||
import { faTimesCircle } from "@fortawesome/free-solid-svg-icons"; | ||
|
||
interface Props { | ||
fingerprint: { | ||
hash: string; | ||
duration: number; | ||
algorithm: FingerprintAlgorithm; | ||
} | ||
}; | ||
deleteFingerprint: () => void; | ||
} | ||
|
||
export const UserFingerprint: FC<Props> = ({ fingerprint, deleteFingerprint }) => ( | ||
export const UserFingerprint: FC<Props> = ({ | ||
fingerprint, | ||
deleteFingerprint, | ||
}) => ( | ||
<li> | ||
<div key={fingerprint.hash}> | ||
<b className="me-2">{fingerprint.algorithm}</b> | ||
{fingerprint.hash} ({formatDuration(fingerprint.duration)}) | ||
<Button | ||
className="text-danger ms-2" | ||
title="Submitted by you - click to remove submission" | ||
onClick={deleteFingerprint} | ||
variant="link" | ||
> | ||
<Icon icon={faTimesCircle} /> | ||
</Button> | ||
</div> | ||
<div key={fingerprint.hash}> | ||
<b className="me-2">{fingerprint.algorithm}</b> | ||
{fingerprint.hash} ({formatDuration(fingerprint.duration)}) | ||
<Button | ||
className="text-danger ms-2" | ||
title="Submitted by you - click to remove submission" | ||
onClick={deleteFingerprint} | ||
variant="link" | ||
> | ||
<Icon icon={faTimesCircle} /> | ||
</Button> | ||
</div> | ||
</li> | ||
) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters