diff --git a/nix/gen/npm-deps-hash.nix b/nix/gen/npm-deps-hash.nix index 0a5d647..6ad2cc0 100644 --- a/nix/gen/npm-deps-hash.nix +++ b/nix/gen/npm-deps-hash.nix @@ -1,3 +1,2 @@ # This file was generated by prefetch-npm-deps "sha256-8S+wA3TI/hVVtr8KmsfE+KPyjZVJGVah2C18UfOspms=" - diff --git a/src/components/App.tsx b/src/components/App.tsx index 65542f0..5d743a7 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -5,8 +5,8 @@ import Landing from './Landing'; import ToastMessage from './ToastMessage'; import About from './vesting/About'; -import YourTokenPlans from './vesting/YourPlans'; -import CreatePlans from './vesting/CreatedPlans'; +import YourTokenPlans from './vesting/Claimer'; +import CreatePlans from './vesting/Provider'; type AppProps = { runtimeURL: string; @@ -31,9 +31,9 @@ const App: React.FC = ({runtimeURL,marloweScanURL,dAppId}) => { return ( - : } /> - : } /> - : } /> + : } /> + : } /> + : } /> : } />
diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx new file mode 100644 index 0000000..42beef7 --- /dev/null +++ b/src/components/Footer.tsx @@ -0,0 +1,48 @@ +import React, { } from 'react'; + +type FooterProps = { + + }; + + +export const Footer : React.FC = () => { + return ( ) + + } + + diff --git a/src/components/vesting/About.tsx b/src/components/vesting/About.tsx index f23a6a4..80ab6a7 100644 --- a/src/components/vesting/About.tsx +++ b/src/components/vesting/About.tsx @@ -8,12 +8,13 @@ import { BrowserRuntimeLifecycleOptions, mkRuntimeLifecycle } from "@marlowe.io/ import { Vesting } from "@marlowe.io/language-examples"; import { mkRestClient } from "@marlowe.io/runtime-rest-client"; import { AddressBech32, ContractId, Tags, unAddressBech32 } from '@marlowe.io/runtime-core'; -import { SupportedWallet } from '@marlowe.io/wallet/browser'; import { RuntimeLifecycle } from '@marlowe.io/runtime-lifecycle/api'; import { ContractDetails } from '@marlowe.io/runtime-rest-client/contract/details'; import HashLoader from 'react-spinners/HashLoader'; import { Input } from '@marlowe.io/language-core-v1'; import { ConnectionWallet } from '../Connection'; +import { SupportedWalletName } from '@marlowe.io/wallet/browser'; +import { Footer } from '../Footer'; const runtimeURL = `${process.env.MARLOWE_RUNTIME_WEB_URL}`; @@ -58,7 +59,7 @@ const About: React.FC = ({setAndShowToast}) => { useEffect(() => { const fetchData = async () => { try { - const runtimeLifecycleParameters : BrowserRuntimeLifecycleOptions = { runtimeURL:runtimeURL, walletName:selectedAWalletExtension as SupportedWallet} + const runtimeLifecycleParameters : BrowserRuntimeLifecycleOptions = { runtimeURL:runtimeURL, walletName:selectedAWalletExtension as SupportedWalletName} const runtimeLifecycle = await mkRuntimeLifecycle(runtimeLifecycleParameters) await runtimeLifecycle.wallet.getChangeAddress() .then((changeAddress : AddressBech32) => setChangeAddress(unAddressBech32(changeAddress))) @@ -84,20 +85,22 @@ const About: React.FC = ({setAndShowToast}) => { return (
- Logo -

Token Plan Prototype

+
+

Token Plan Prototype

+

/ About

+
-
- | - | +
+ | + |
- Prototype Description to be done. + This prototype
+
- ); }; diff --git a/src/components/vesting/YourPlans.tsx b/src/components/vesting/Claimer.tsx similarity index 91% rename from src/components/vesting/YourPlans.tsx rename to src/components/vesting/Claimer.tsx index 89ea1fd..4523049 100644 --- a/src/components/vesting/YourPlans.tsx +++ b/src/components/vesting/Claimer.tsx @@ -15,6 +15,7 @@ import { Input } from '@marlowe.io/language-core-v1'; import { Contract } from './Models'; import { contractIdLink, displayCloseCondition } from './Utils'; import { ConnectionWallet } from '../Connection'; +import { Footer } from '../Footer'; type YourTokenPlansProps = { @@ -42,9 +43,6 @@ const YourTokenPlans: React.FC = ({runtimeURL,marloweScanUR const [isWaitingConfirmation, setWaitingConfirmation] = useState(false); - const truncatedAddress = changeAddress.slice(0,18); - - useEffect(() => { const fetchData = async () => { if(isFetching) return; @@ -163,42 +161,19 @@ const YourTokenPlans: React.FC = ({runtimeURL,marloweScanUR ); } } - - - const copyToClipboard = async () => { - try { - await navigator.clipboard.writeText(changeAddress); - setAndShowToast( - 'Address copied to clipboard', - Copied {changeAddress} to clipboard, - false - ); - } catch (err) { - console.error('Failed to copy address: ', err); - } - }; - - const disconnectWallet = () => { - localStorage.removeItem('walletProvider'); - setChangeAddress(''); - setAndShowToast( - 'Disconnected wallet', - Please, Connect a wallet to see your Token Plans., - false - ); - navigate('/'); - } return (
- Logo -

Token Plan Prototype

+
+

Token Plan Prototype

+

/ Claimer's View

+
-
- | - | +
+ | + |
@@ -312,6 +287,7 @@ const YourTokenPlans: React.FC = ({runtimeURL,marloweScanUR )}
+
); diff --git a/src/components/vesting/CreatedPlans.tsx b/src/components/vesting/Provider.tsx similarity index 96% rename from src/components/vesting/CreatedPlans.tsx rename to src/components/vesting/Provider.tsx index f6016b5..5bd98e9 100644 --- a/src/components/vesting/CreatedPlans.tsx +++ b/src/components/vesting/Provider.tsx @@ -17,6 +17,7 @@ import { Address, Input } from '@marlowe.io/language-core-v1'; import { Contract } from './Models'; import { contractIdLink, displayCloseCondition } from './Utils'; import { ConnectionWallet } from '../Connection'; +import { Footer } from '../Footer'; type CreatePlansProps = { runtimeURL : string, @@ -235,13 +236,15 @@ const CreatePlans: React.FC = ({runtimeURL,marloweScanURL,dApp return (
- Logo -

Token Plan Prototype

+
+

Token Plan Prototype

+

/ Token Provider's View

+
-
- | - | +
+ | + |
@@ -432,8 +435,8 @@ const CreatePlans: React.FC = ({runtimeURL,marloweScanURL,dApp closeModal={() => setShowNewVestingScheduleModal(false) } changeAddress={changeAddress} /> +
- ); }; diff --git a/src/styles/main.scss b/src/styles/main.scss index 92097a7..7d520cf 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -3940,7 +3940,7 @@ html[data-theme=dark] .card_WrXe:hover,html[data-theme=dark] .card_ZNYu:hover { background-position: bottom; background-repeat: no-repeat; padding-bottom: 6.25rem; - padding-top: 6.25rem + padding-top: 1.25rem } .footerLogo_Z1bf {