mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
Update board-buttons.tsx
This commit is contained in:
@@ -92,7 +92,7 @@ const UpdateButton = () => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const isMobile = useIsMobile();
|
const isMobile = useIsMobile();
|
||||||
|
|
||||||
const handleUpdate = () => {
|
const handleManualUpdate = () => {
|
||||||
window.alert('Manual updates are not available yet. Posts update automatically every ~2 minutes.');
|
window.alert('Manual updates are not available yet. Posts update automatically every ~2 minutes.');
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -100,11 +100,11 @@ const UpdateButton = () => {
|
|||||||
<>
|
<>
|
||||||
{/* TODO: Implement update button once available in API */}
|
{/* TODO: Implement update button once available in API */}
|
||||||
{isMobile ? (
|
{isMobile ? (
|
||||||
<button className={`button ${styles.disabledButton}`} onClick={handleUpdate}>
|
<button className={`button ${styles.disabledButton}`} onClick={handleManualUpdate}>
|
||||||
{t('update')}
|
{t('update')}
|
||||||
</button>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<button className={`button ${styles.disabledButton}`} onClick={handleUpdate}>
|
<button className={`button ${styles.disabledButton}`} onClick={handleManualUpdate}>
|
||||||
{t('update')}
|
{t('update')}
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
@@ -116,17 +116,21 @@ const AutoButton = () => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const isMobile = useIsMobile();
|
const isMobile = useIsMobile();
|
||||||
|
|
||||||
|
const handleManualUpdate = () => {
|
||||||
|
window.alert('Manual updates are not available yet. Posts update automatically every ~2 minutes.');
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{isMobile ? (
|
{isMobile ? (
|
||||||
<button className='button'>
|
<button className='button' onClick={handleManualUpdate}>
|
||||||
<label>
|
<label>
|
||||||
<input type='checkbox' className={styles.autoCheckbox} checked disabled />
|
<input type='checkbox' className={styles.autoCheckbox} checked disabled />
|
||||||
{t('Auto')}
|
{t('Auto')}
|
||||||
</label>
|
</label>
|
||||||
</button>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<label>
|
<label onClick={handleManualUpdate}>
|
||||||
{' '}
|
{' '}
|
||||||
<input type='checkbox' className={styles.autoCheckbox} checked disabled /> {t('Auto')}
|
<input type='checkbox' className={styles.autoCheckbox} checked disabled /> {t('Auto')}
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
Reference in New Issue
Block a user