From aaaed5db99abeb1d7721668e52a330139767da5e Mon Sep 17 00:00:00 2001 From: Andrea Antonutti <56296563+1M4nt0@users.noreply.github.com> Date: Wed, 8 Nov 2023 11:22:10 +0100 Subject: [PATCH] feat: Add smart contracts addresses to course info page (#40) --- .../ui/src/Course/CourseInfo/CourseInfo.tsx | 52 ++++++++++++++++--- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/packages/ui/src/Course/CourseInfo/CourseInfo.tsx b/packages/ui/src/Course/CourseInfo/CourseInfo.tsx index 3db6b6b..ac07d00 100644 --- a/packages/ui/src/Course/CourseInfo/CourseInfo.tsx +++ b/packages/ui/src/Course/CourseInfo/CourseInfo.tsx @@ -12,9 +12,11 @@ import { Stack, Text, Image, + Icon, } from '@chakra-ui/react' import NextLink from 'next/link' -import { ChainSnapshotWebsite } from '@dae/chains' +import { ChainBlockExplorer, ChainSnapshotWebsite } from '@dae/chains' +import { FiLink, FiBook } from 'react-icons/fi' export const CourseInfo: React.FC = () => { const { data, isLoading, error } = useCourseData() @@ -56,34 +58,40 @@ export const CourseInfo: React.FC = () => { const snapshotWebsite = ChainSnapshotWebsite[data.chain_id as keyof typeof ChainSnapshotWebsite] + const chainBlockExplorer = + ChainBlockExplorer[data.chain_id as keyof ChainBlockExplorer] + return (
Green double couch with wooden legs
- + {data.name} - {data.description} + {data.description} - + + + Links + + Website:{' '} = () => { {data.media_channel ? ( - + Media Channel:{' '} = () => { ) : ( <> )} - + Snapshot Space:{' '} = () => { + + + + Smart Contracts + + + Course:{' '} + + {data.address} + + + + Karma:{' '} + + {data.karma_access_control_address} + + +