mirror of
https://github.com/Vikeo/LifeTrinket.git
synced 2025-11-17 00:08:01 +00:00
more logs
This commit is contained in:
@@ -42,6 +42,13 @@ export const SettingsModal = ({ isOpen, closeModal }: SettingsModalProps) => {
|
|||||||
);
|
);
|
||||||
const data = await result.json();
|
const data = await result.json();
|
||||||
|
|
||||||
|
if (!data.name) {
|
||||||
|
console.log('no version string found, result:', result);
|
||||||
|
setIsLatestVersion(false);
|
||||||
|
newVersion.current = undefined;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* @ts-expect-error is defined in vite.config.ts*/
|
/* @ts-expect-error is defined in vite.config.ts*/
|
||||||
if (data.name === APP_VERSION) {
|
if (data.name === APP_VERSION) {
|
||||||
console.log('latestVersion true');
|
console.log('latestVersion true');
|
||||||
@@ -50,6 +57,7 @@ export const SettingsModal = ({ isOpen, closeModal }: SettingsModalProps) => {
|
|||||||
setIsLatestVersion(true);
|
setIsLatestVersion(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('latestVersion false');
|
console.log('latestVersion false');
|
||||||
setIsLatestVersion(false);
|
setIsLatestVersion(false);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -143,13 +151,13 @@ export const SettingsModal = ({ isOpen, closeModal }: SettingsModalProps) => {
|
|||||||
<span className="text-sm text-text-secondary">(latest)</span>
|
<span className="text-sm text-text-secondary">(latest)</span>
|
||||||
)}
|
)}
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
{!isLatestVersion && (
|
{!isLatestVersion && newVersion.current && (
|
||||||
<Paragraph className="text-text-secondary text-lg text-center">
|
<Paragraph className="text-text-secondary text-lg text-center">
|
||||||
New version ({newVersion.current}) is available!{' '}
|
New version ({newVersion.current}) is available!{' '}
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
)}
|
)}
|
||||||
</SettingContainer>
|
</SettingContainer>
|
||||||
{!isLatestVersion && (
|
{!isLatestVersion && newVersion.current && (
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
style={{ marginTop: '0.25rem', marginBottom: '0.25rem' }}
|
style={{ marginTop: '0.25rem', marginBottom: '0.25rem' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user