robosats/frontend/src/components/HostAlert/SelfhostedAlert.tsx
KoalaSat 293c0b604d Refactor contexts and models (#921)
* Add SVG icons for map pins

* Add federation basis and new coordinator form (#793)

* Add new coordinator entry issue form

* Add Federation basis

* Fix eslint errors from F2F and fix languages

* Redo eslint @typescript-eslint/strict-boolean-expressions

* Robot Page working

* Contexts Working

* Garage Working

* CurrentOrder working

* Federation model working

---------

Co-authored-by: Reckless_Satoshi <reckless.satoshi@protonmail.com>
Co-authored-by: Reckless_Satoshi <90936742+Reckless-Satoshi@users.noreply.github.com>
2023-12-02 10:40:59 +00:00

44 lines
1.1 KiB
TypeScript

import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Paper, Alert, AlertTitle, Button } from '@mui/material';
const SelfhostedAlert = (): JSX.Element => {
const { t } = useTranslation();
const [show, setShow] = useState<boolean>(true);
// If alert is hidden return null
if (!show) {
return <></>;
}
// Show selfhosted notice
else {
return (
<div>
<Paper elevation={6} className='unsafeAlert'>
<Alert
severity='success'
sx={{ maxHeight: '8em' }}
action={
<Button
color='success'
onClick={() => {
setShow(false);
}}
>
{t('Hide')}
</Button>
}
>
<AlertTitle>{t('You are self-hosting RoboSats')}</AlertTitle>
{t(
'RoboSats client is served from your own node granting you the strongest security and privacy.',
)}
</Alert>
</Paper>
</div>
);
}
};
export default SelfhostedAlert;