diff --git a/src/components/AssetTab.tsx b/src/components/AssetTab.tsx index 25e9f29..86f79a4 100644 --- a/src/components/AssetTab.tsx +++ b/src/components/AssetTab.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react' -import { useNavigate, useParams, Link as RouterLink } from 'react-router-dom' +import { useNavigate, useParams } from 'react-router-dom' import { Box, @@ -12,7 +12,6 @@ import { TablePagination, Typography, Tooltip, - Link, } from '@mui/material' import { styled } from '@mui/system' @@ -356,44 +355,6 @@ const AssetTab = () => { {assets.length} - - - - Total change - - - 0 - - - - - - Publisher staking - - - - - 100,000 - - - TOSI - - - diff --git a/src/components/DetailsTab.tsx b/src/components/DetailsTab.tsx index 9cfcc98..ea5f3f5 100644 --- a/src/components/DetailsTab.tsx +++ b/src/components/DetailsTab.tsx @@ -1,19 +1,18 @@ import React, { useEffect } from 'react' import { useParams } from 'react-router-dom' -import { Box, Typography, Table, TableBody, TableRow, TableContainer, TableCell, Link } from '@mui/material' -import { styled } from '@mui/system' -import moment from 'moment' +import { Box, Typography, Table, TableBody, TableRow, TableContainer } from '@mui/material' + import { SectionWrapper } from './SingleAssetStyles' import { TableNameCell, TableValueCell, CustomLink } from './TableStyles' import { useTrustlessIndexingContext } from '../hooks/useTrustlessIndexing' import IconLocationMark from '../assets/images/icon-location-mark.svg' -import IconDownload from '../assets/images/icon-download.svg' + import { formatDate } from '../utils/timestapFormater' const DetailsTab = () => { const { assetContract, assetTokenId } = useParams() - const { isTLILoading, TLIDataSet, setTLIQuery } = useTrustlessIndexingContext() + const { TLIDataSet, setTLIQuery } = useTrustlessIndexingContext() useEffect(() => setTLIQuery({ assetContract, assetTokenId }), [assetContract, assetTokenId, setTLIQuery]) const token = TLIDataSet ? TLIDataSet.token : undefined diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 81757ca..45744de 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -1,7 +1,6 @@ import React from 'react' -import { Link as RouterLink } from 'react-router-dom' -import { Container, Box, IconButton, Typography, List, ListItem, Link } from '@mui/material' +import { Container, Box } from '@mui/material' import TwitterIcon from '@mui/icons-material/Twitter' import YouTubeIcon from '@mui/icons-material/YouTube' @@ -15,59 +14,13 @@ const Footer = () => { } return ( - + - - - Explore the world’s greenest blockchain. - - - - - - About TOSI - - - - - - Publishers - - - - - - Cookies - - - - - - Privacy - - - - { - + */} ) diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 3677d7c..f4b56a6 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -3,11 +3,9 @@ import { Link as RouterLink, useLocation } from 'react-router-dom' import { AppBar, Container, Toolbar, Link, List, ListItem } from '@mui/material' import { styled } from '@mui/system' -import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown' import { ReactComponent as Logo } from '../assets/images/tosiscan-logo-header.svg' import { ReactComponent as LogoColors } from '../assets/images/tosiscan-logo-light.svg' -import { theme } from '../theme' const NavLink = styled(Link)(({ theme }) => ({ paddingTop: theme.spacing(1), @@ -45,47 +43,6 @@ const Header = () => { Home - - - - Digital Assets - - - - - - File Verifications - - - - - - Publishers - - - - - - - Become a publisher - - diff --git a/src/components/Hero.tsx b/src/components/Hero.tsx index 5a1f651..232747b 100644 --- a/src/components/Hero.tsx +++ b/src/components/Hero.tsx @@ -1,6 +1,6 @@ import React from 'react' -import { Box, Container, Typography } from '@mui/material' +import { Box, Container } from '@mui/material' import { styled } from '@mui/system' import { ReactComponent as Logo } from '../assets/images/tosiscan-logo-center.svg' @@ -21,11 +21,7 @@ const Hero = () => (
- - - - Explore the world’s greenest blockchain - + diff --git a/src/components/OverviewSingleAssetTab.tsx b/src/components/OverviewSingleAssetTab.tsx index 81c9107..06f8b38 100644 --- a/src/components/OverviewSingleAssetTab.tsx +++ b/src/components/OverviewSingleAssetTab.tsx @@ -2,18 +2,14 @@ import React from 'react' import { Link as RouterLink, useParams } from 'react-router-dom' import moment from 'moment' -import { Box, Link, Table, TableBody, TableContainer, TableRow, Tooltip, Typography } from '@mui/material' +import { Box, Link, Table, TableBody, TableContainer, TableRow, Typography } from '@mui/material' import { TableNameCell, TableValueCell } from './TableStyles' import IconCheck from '../assets/images/icon-check.svg' -import IconInfo from '../assets/images/icon-info.svg' import { useDataSetAssetsContext } from '../hooks/useDatachainOutput' -import { getVerificationComponent } from './Verifications' -import Issuer from './Issuer' - const OverviewSingleAssetTab = () => { const { assetContract, assetTokenId, assetSerial, id } = useParams() const { selectedDataSet, isLoading } = useDataSetAssetsContext() @@ -29,105 +25,87 @@ const OverviewSingleAssetTab = () => { ) const datasetName = metaData?.name - const location = asset?.locations[0] - - const tokenId = location?.tokenId - const hovermessage = 'Verified successfully' - - const Verification = getVerificationComponent(datasetName || '') return ( - <> - - - Overview - - - - - - {asset?.assetNumber && ( - - Serial No. - {asset?.assetNumber} - - )} - - - Asset - - {asset?.locations[0].name} - - - + + + Overview + + + +
+ + {asset?.assetNumber && ( - Last verified - - {!isLoading && lastVerified - ? moment(moment.unix(lastVerified).utc().format('DD MMM YYYY HH:mm:ss [UTC]')).fromNow() - : 'loading...'} - - - - - Status - - {/* */} - . - {/* */} - - - - - Quantity - {asset?.attributes?.quantity} - - - - Project - {asset?.attributes?.resourceName} - - - - Location - {asset?.attributes?.country} - - - - Dataset - - - {datasetName} - - + Serial No. + {asset?.assetNumber} - -
-
-
- - - - Supporting verification - - - - - + )} + + + Asset + {asset?.locations[0].name} + + + + Last verified + + {!isLoading && lastVerified + ? moment(moment.unix(lastVerified).utc().format('DD MMM YYYY HH:mm:ss [UTC]')).fromNow() + : 'loading...'} + + + + + Status + + {/* */} + . + {/* */} + + + + + Quantity + {asset?.attributes?.quantity} + + + + Project + {asset?.attributes?.resourceName} + + + + Location + {asset?.attributes?.country} + + + + Dataset + + + {datasetName} + + + + + + + ) } diff --git a/src/components/OverviewTab.tsx b/src/components/OverviewTab.tsx index f173b8d..1aece1d 100644 --- a/src/components/OverviewTab.tsx +++ b/src/components/OverviewTab.tsx @@ -1,4 +1,4 @@ -import { useNavigate, useParams } from 'react-router-dom' +import { useNavigate } from 'react-router-dom' import { useState } from 'react' import { @@ -9,19 +9,16 @@ import { TableCell, TableContainer, Typography, - Link, TableHead, Stack, Button, - Tooltip, } from '@mui/material' import { styled } from '@mui/system' import { TableBodyRow } from './TableStyles' -import { useDataSetAssetsContext, StatusType, IVerifications, IFinalAsset } from '../hooks/useDatachainOutput' -import { formatTimeStamp, formatDate, formatTimeLeft } from '../utils/timestapFormater' +import { useDataSetAssetsContext, StatusType, IVerifications } from '../hooks/useDatachainOutput' +import { formatDate, formatTimeLeft } from '../utils/timestapFormater' -import { getVerificationComponent } from './Verifications' import { getOverviewComponent } from './DatasetOverview' import Issuer from './Issuer' @@ -63,7 +60,7 @@ const LastFiles = ({ datasetId }: { datasetId: string }) => { } const LinkedVerifiedFiles = ({ datasetId }: { datasetId: string }) => { - const { isLoading, datasetOutputs, selectedDataSet } = useDataSetAssetsContext() + const { datasetOutputs, selectedDataSet } = useDataSetAssetsContext() const linkedCIDs = selectedDataSet?.metadata?.datasetLinked const datasets = Object.values(datasetOutputs).filter((linkDataset) => @@ -329,8 +326,6 @@ const OverviewTab = () => { const datasetVerifications = selectedDataSet?.verifications || [] const description = metaData ? metaData['asset-description'] : '' - // @ts-ignore - const Verification = getVerificationComponent(datasetName) // @ts-ignore const Header = getOverviewComponent(datasetName, description) return ( @@ -463,14 +458,6 @@ const OverviewTab = () => { - - - Supporting verification - - - - - {selectedDataSet?.metadata?.datasetLinked ? ( ) : ( diff --git a/src/components/SingleAssetVerificationTab.tsx b/src/components/SingleAssetVerificationTab.tsx deleted file mode 100644 index 940533e..0000000 --- a/src/components/SingleAssetVerificationTab.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react' - -import { Box, Typography } from '@mui/material' -import { useDataSetAssetsContext } from '../hooks/useDatachainOutput' -import { getVerificationComponent } from './Verifications' - -const SingleAssetVerificationTab = () => { - const { selectedDataSet, isLoading } = useDataSetAssetsContext() - const datasetName = selectedDataSet?.metadata?.name || 'Lohko Gold' - - const Verification = getVerificationComponent(datasetName || '') - return ( - - - Supporting verification - - - - - ) -} - -export default () => diff --git a/src/components/TabsSingleAsset.tsx b/src/components/TabsSingleAsset.tsx index f76de13..f52a780 100644 --- a/src/components/TabsSingleAsset.tsx +++ b/src/components/TabsSingleAsset.tsx @@ -8,7 +8,6 @@ import { styled } from '@mui/system' import SingleAssetDetailsTab from './SingleAssetDetailsTab' import SingleAssetAttributeTab from './SingleAssetAttributeTab' -import SingleAssetVerificationTab from './SingleAssetVerificationTab' const TabsList = styled(TabsListUnstyled)(({ theme }) => ({ display: 'flex', @@ -49,7 +48,7 @@ const TabsSingleAsset = () => ( Details Attributes - Supporting verification + {/* History */} @@ -61,10 +60,6 @@ const TabsSingleAsset = () => ( - - - - {/* 4sdfsdf */} diff --git a/src/constants/Publishers.json b/src/constants/Publishers.json index 7dbbde9..4477679 100644 --- a/src/constants/Publishers.json +++ b/src/constants/Publishers.json @@ -1,7 +1,7 @@ { "Lohko": { "name": "Lohko Pte Ltd", - "description": "Whether it’s gold, silver, art, or other assets, Lohko digitalises tangible assets and gives investors full control.", + "description": "", "twitter": "lohkowallet", "web": "https://app.lohkoinvest.com", "webName": "app.lohkoinvest.com", @@ -11,7 +11,7 @@ }, "AirImpact": { "name": "AirImpact", - "description": "We develop solutions to enable transparent value transfer in donations, carbon credits, mobile airtime, and digital coupons.", + "description": "", "web": "https://airimpact.co/", "webName": "https://airimpact.co/", "publisherSince": "May 2022", @@ -19,7 +19,7 @@ }, "Verra": { "name": "Verra", - "description": "Verra sets the world’s leading standards for climate action and sustainable development.", + "description": "", "web": "http://verra.org/", "webName": "verra.org", "publisherSince": "May 2022", diff --git a/src/views/Home.tsx b/src/views/Home.tsx index dccec7c..aeaf8d8 100644 --- a/src/views/Home.tsx +++ b/src/views/Home.tsx @@ -1,11 +1,9 @@ import React from 'react' -import { useNavigate, Link as RouterLink } from 'react-router-dom' +import { useNavigate } from 'react-router-dom' -import { Container, Box, Typography, Button } from '@mui/material' +import { Container, Box, Typography } from '@mui/material' import { styled } from '@mui/system' -import BgCta from '../assets/images/bg-cta.jpg' - import VerificationList from '../components/VerificationList' const ContentContainer = styled(Container)(({ theme }) => ({ @@ -19,18 +17,6 @@ const ContentContainer = styled(Container)(({ theme }) => ({ margin: '0 auto', })) -const CtaWrapper = styled(Box)(({ theme }) => ({ - marginTop: '133px', - marginBottom: '95px', - padding: '64px', - backgroundColor: theme.palette.grey['50'], - borderRadius: '24px', - backgroundImage: `url(${BgCta})`, - backgroundSize: 'contain', - backgroundRepeat: 'no-repeat', - backgroundPosition: 'top right', -})) - const Home = () => { const navigate = useNavigate() @@ -48,47 +34,6 @@ const Home = () => { - - - - - - Climate and nature positive - - - Learn how each data verification on the TOSI chain will make the planet's forests and biodiversity - grow. - - - - - - - - - ) }