mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-23 08:38:11 +00:00
feat: use new components
This commit is contained in:
parent
bd0192c6dd
commit
fde5758d84
@ -1,7 +1,12 @@
|
||||
import ReactMarkdown from 'react-markdown'
|
||||
import MarkdownLink from './MarkdownLink'
|
||||
|
||||
const Markdown = ({ children }) => {
|
||||
return <ReactMarkdown children={children} components={{ a: Linkk }} />
|
||||
type MarkdownProps = {
|
||||
children: string
|
||||
}
|
||||
|
||||
const Markdown = ({ children }: MarkdownProps) => {
|
||||
return <ReactMarkdown children={children} components={{ a: MarkdownLink }} />
|
||||
}
|
||||
|
||||
export default Markdown
|
||||
|
@ -2,13 +2,12 @@ import { YStack } from 'tamagui'
|
||||
import { Text } from '@status-im/components'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { useState } from 'react'
|
||||
import Markdown from 'react-markdown'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
import { RootState } from '../../../../redux/store'
|
||||
import { DOCUMENTATIONS } from './documentations'
|
||||
import { MAC } from '../../../../constants'
|
||||
import OSCards from './OSCards'
|
||||
import Markdown from '../../../../components/General/Markdown/Markdown'
|
||||
|
||||
const ValidatorSetupInstall = () => {
|
||||
const [selectedOS, setSelectedOS] = useState(MAC)
|
||||
@ -34,7 +33,7 @@ const ValidatorSetupInstall = () => {
|
||||
space={'$2'}
|
||||
>
|
||||
<Text size={19}>Installing {selectedClient}</Text>
|
||||
<Markdown components={{ a: Linkk }}>{DOCUMENTATIONS[selectedClient].general}</Markdown>
|
||||
<Markdown children={DOCUMENTATIONS[selectedClient].general} />
|
||||
<OSCards selectedOS={selectedOS} handleOSCardClick={handleOSCardClick} />
|
||||
<Markdown children={DOCUMENTATIONS[selectedClient].documentation[selectedOS]} />
|
||||
</YStack>
|
||||
@ -42,12 +41,4 @@ const ValidatorSetupInstall = () => {
|
||||
)
|
||||
}
|
||||
|
||||
const Linkk = (props: any) => {
|
||||
return (
|
||||
<Link to={props.href} target="_blank">
|
||||
{props.children}
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
|
||||
export default ValidatorSetupInstall
|
||||
|
Loading…
x
Reference in New Issue
Block a user