From 5ab90a8f1db71da35a826fb7c8ed5bcececea28c Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Tue, 24 Oct 2023 17:28:09 +0300 Subject: [PATCH] feat: create component to show current docs with specifics --- .../CurrentPlatformOSContent.tsx | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorInstalling/CurrentPlatformOSContent.tsx diff --git a/src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorInstalling/CurrentPlatformOSContent.tsx b/src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorInstalling/CurrentPlatformOSContent.tsx new file mode 100644 index 00000000..43d7b300 --- /dev/null +++ b/src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorInstalling/CurrentPlatformOSContent.tsx @@ -0,0 +1,43 @@ +import { useSelector } from 'react-redux' +import { DOCUMENTATIONS } from './documentations' +import { YStack } from 'tamagui' +import { Link } from 'react-router-dom' +import { Text } from '@status-im/components' + +import { RootState } from '../../../../redux/store' +import SyntaxHighlighterBox from './SyntaxHighlighter' + +type CurrentPlatformOSContentProps = { + selectedOS: string +} + +const CurrentPlatformOSContent = ({ selectedOS }: CurrentPlatformOSContentProps) => { + const selectedClient = useSelector((state: RootState) => state.execClient.selectedClient) + + return ( + + {DOCUMENTATIONS[selectedClient].documentation[selectedOS].map((item, index) => { + switch (item.type) { + case 'code': + return + case 'link': + return ( + + {item.content} + + ) + case 'text': + return ( + + {item.content} + + ) + default: + return null + } + })} + + ) +} + +export default CurrentPlatformOSContent