mirror of
https://github.com/tlsnotary/tlsn-extension.git
synced 2026-01-09 21:18:02 -05:00
refactor: trying to fix some of the GH action checks
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
deleteRequestHistory,
|
||||
} from '../../reducers/history';
|
||||
import Icon from '../../components/Icon';
|
||||
import { get, NOTARY_API_LS_KEY, PROXY_API_LS_KEY, set } from '../../utils/storage';
|
||||
import { get, NOTARY_API_LS_KEY, PROXY_API_LS_KEY } from '../../utils/storage';
|
||||
import { urlify, download, upload } from '../../utils/misc';
|
||||
import { BackgroundActiontype } from '../../entries/Background/rpc';
|
||||
import Modal, {
|
||||
@@ -72,7 +72,9 @@ function OneRequestHistory(props: { requestId: string }): ReactElement {
|
||||
const openModal = useCallback(() => setIsOpen(true), [setIsOpen]);
|
||||
const handleAccept = useCallback(async () => {
|
||||
try {
|
||||
const data = await upload(`${request?.id}.json`, JSON.stringify(request?.proof));
|
||||
const data = await upload(
|
||||
`${request?.id}.json`, JSON.stringify(request?.proof)
|
||||
);
|
||||
setCid(data);
|
||||
setAccepted(true);
|
||||
} catch (e) {
|
||||
@@ -155,7 +157,9 @@ function OneRequestHistory(props: { requestId: string }): ReactElement {
|
||||
<button
|
||||
className="flex flex-row flex-grow-0 gap-2 self-end items-center justify-end px-2 py-1 bg-slate-100 text-slate-300 hover:bg-slate-200 hover:text-slate-500 hover:font-bold"
|
||||
onClick={() =>
|
||||
download(`${request?.id}.json`, JSON.stringify(request?.proof))
|
||||
download(
|
||||
`${request?.id}.json`, JSON.stringify(request?.proof)
|
||||
)
|
||||
}
|
||||
>
|
||||
<Icon className="" fa="fa-solid fa-download" size={1} />
|
||||
@@ -164,9 +168,6 @@ function OneRequestHistory(props: { requestId: string }): ReactElement {
|
||||
<button
|
||||
className="flex flex-row flex-grow-0 gap-2 self-end items-center justify-end px-2 py-1 bg-slate-100 text-slate-300 hover:bg-slate-200 hover:text-slate-500 hover:font-bold"
|
||||
onClick={openModal}
|
||||
// onClick={async () =>
|
||||
// await upload(`${request?.id}.json`, JSON.stringify(request?.proof))
|
||||
// }
|
||||
>
|
||||
<Icon className="" fa="fa-solid fa-upload" size={1} />
|
||||
<span>Share</span>
|
||||
@@ -174,8 +175,8 @@ function OneRequestHistory(props: { requestId: string }): ReactElement {
|
||||
{isOpen && (
|
||||
<Modal
|
||||
className="flex flex-col gap-4 items-center text-base cursor-default justify-center !w-auto mx-4 my-[50%] min-h-24 p-4 border border-red-500"
|
||||
onClose={() => setIsOpen(false) }
|
||||
>
|
||||
onClose={() => setIsOpen(false)}
|
||||
>
|
||||
<ModalHeader onClose={() => setIsOpen(false)}>Share Proof</ModalHeader>
|
||||
<ModalContent className="flex flex-col gap-4 items-center text-base justify-center">
|
||||
<p className="text-red-500 font-bold text-center">This will make your proof publicly accessible by anyone with the CID</p>
|
||||
|
||||
@@ -4,7 +4,7 @@ import React, {
|
||||
useState,
|
||||
MouseEventHandler,
|
||||
} from 'react';
|
||||
import { useParams, useLocation, useNavigate } from 'react-router';
|
||||
import { useParams, useNavigate } from 'react-router';
|
||||
import c from 'classnames';
|
||||
import { useRequestHistory } from '../../reducers/history';
|
||||
import Icon from '../../components/Icon';
|
||||
|
||||
Reference in New Issue
Block a user