mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
style(post page): add window alert about Update button
This commit is contained in:
@@ -92,13 +92,21 @@ const UpdateButton = () => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const isMobile = useIsMobile();
|
const isMobile = useIsMobile();
|
||||||
|
|
||||||
|
const handleUpdate = () => {
|
||||||
|
window.alert('Manual updates are not available yet. Posts update automatically every ~2 minutes.');
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* TODO: Implement update button once available in API */}
|
{/* TODO: Implement update button once available in API */}
|
||||||
{isMobile ? (
|
{isMobile ? (
|
||||||
<button className={`button ${styles.disabledButton}`}>{t('update')}</button>
|
<button className={`button ${styles.disabledButton}`} onClick={handleUpdate}>
|
||||||
|
{t('update')}
|
||||||
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<button className={`button ${styles.disabledButton}`}>{t('update')}</button>
|
<button className={`button ${styles.disabledButton}`} onClick={handleUpdate}>
|
||||||
|
{t('update')}
|
||||||
|
</button>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user