import React from 'react'; import { defineMessages, useIntl, FormattedMessage } from 'react-intl'; import { Button, Card, CardBody } from 'soapbox/components/ui'; import { useOwnAccount, useAppSelector } from 'soapbox/hooks'; const messages = defineMessages({ title: { id: 'onboarding.welcome.title', defaultMessage: 'Welcome on the Fediverse' }, body1: { id: 'onboarding.welcome.body1', defaultMessage: 'This website is your gateway to a network of independent servers that communicate together to form a larger social network: the fediverse.' }, body2: { id: 'onboarding.welcome.body2', defaultMessage: 'Each server is called an “instance”. Your instance is simply this site: ' }, username: { id: 'onboarding.welcome.username', defaultMessage: 'You full username' }, explanation: { id: 'onboarding.welcome.explanation', defaultMessage: 'It is this identifier that you can share on the fediverse' }, }); const Welcome = ({ onNext }: { onNext: () => void }) => { const intl = useIntl(); const account = useOwnAccount(); const instance = useAppSelector((state: any) => state.instance); return (

{intl.formatMessage(messages.title)}

  {instance.get('uri').replace(/https?:\/\//, '')}

{intl.formatMessage(messages.username)}

@{account?.acct}@{instance.get('uri').replace(/https?:\/\//, '')}
{intl.formatMessage(messages.explanation)}
); }; export default Welcome;