mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-05-15 22:26:58 +00:00
99 lines
2.4 KiB
TypeScript
99 lines
2.4 KiB
TypeScript
import { Box, ButtonBase, Typography } from '@mui/material';
|
|
import { Spacer } from '../../common/Spacer';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
export const NewUsersCTA = ({ balance }) => {
|
|
const { t } = useTranslation(['core']);
|
|
|
|
if (balance === undefined || +balance > 0) return null;
|
|
|
|
return (
|
|
<Box
|
|
sx={{
|
|
alignItems: 'center',
|
|
display: 'flex',
|
|
flexDirection: 'column',
|
|
width: '100%',
|
|
}}
|
|
>
|
|
<Spacer height="40px" />
|
|
|
|
<Box
|
|
sx={{
|
|
alignItems: 'center',
|
|
borderRadius: '4px',
|
|
flexDirection: 'column',
|
|
justifyContent: 'center',
|
|
outline: '1px solid gray',
|
|
padding: '15px',
|
|
width: '320px',
|
|
}}
|
|
>
|
|
<Typography
|
|
sx={{
|
|
fontSize: '1.2rem',
|
|
fontWeight: 'bold',
|
|
textAlign: 'center',
|
|
}}
|
|
>
|
|
{t('core:question.new_user', { postProcess: 'capitalize' })}
|
|
</Typography>
|
|
|
|
<Spacer height="20px" />
|
|
|
|
<Typography>
|
|
{t('core:message_us', { postProcess: 'capitalize' })}
|
|
</Typography>
|
|
|
|
<Spacer height="20px" />
|
|
|
|
<Box
|
|
sx={{
|
|
width: '100%',
|
|
display: 'flex',
|
|
gap: '10px',
|
|
justifyContent: 'center',
|
|
}}
|
|
>
|
|
<ButtonBase
|
|
sx={{
|
|
textDecoration: 'underline',
|
|
}}
|
|
onClick={() => {
|
|
if (window?.electronAPI?.openExternal) {
|
|
window.electronAPI.openExternal(
|
|
'https://link.qortal.dev/telegram-invite'
|
|
);
|
|
} else {
|
|
window.open(
|
|
'https://link.qortal.dev/telegram-invite',
|
|
'_blank'
|
|
);
|
|
}
|
|
}}
|
|
>
|
|
Telegram
|
|
</ButtonBase>
|
|
|
|
<ButtonBase
|
|
sx={{
|
|
textDecoration: 'underline',
|
|
}}
|
|
onClick={() => {
|
|
if (window?.electronAPI?.openExternal) {
|
|
window.electronAPI.openExternal(
|
|
'https://link.qortal.dev/discord-invite'
|
|
);
|
|
} else {
|
|
window.open('https://link.qortal.dev/discord-invite', '_blank');
|
|
}
|
|
}}
|
|
>
|
|
Discord
|
|
</ButtonBase>
|
|
</Box>
|
|
</Box>
|
|
</Box>
|
|
);
|
|
};
|