From 879581224a00d0070ef9068fbebeccfa242cf879 Mon Sep 17 00:00:00 2001 From: ajnart Date: Wed, 18 May 2022 22:08:09 +0200 Subject: [PATCH] :fire: Remove update indicator from settings Co-authored-by: Bjorn L. --- src/components/Settings/SettingsMenu.tsx | 40 +++--------------------- 1 file changed, 4 insertions(+), 36 deletions(-) diff --git a/src/components/Settings/SettingsMenu.tsx b/src/components/Settings/SettingsMenu.tsx index cbd30c987..ed7c425c6 100644 --- a/src/components/Settings/SettingsMenu.tsx +++ b/src/components/Settings/SettingsMenu.tsx @@ -2,19 +2,15 @@ import { ActionIcon, Group, Modal, - Switch, Title, Text, Tooltip, SegmentedControl, - Indicator, - Alert, TextInput, } from '@mantine/core'; import { useColorScheme } from '@mantine/hooks'; -import { useEffect, useState } from 'react'; -import { AlertCircle, Settings as SettingsIcon } from 'tabler-icons-react'; -import { CURRENT_VERSION, REPO_URL } from '../../../data/constants'; +import { useState } from 'react'; +import { Settings as SettingsIcon } from 'tabler-icons-react'; import { useConfig } from '../../tools/state'; import { ColorSchemeSwitch } from '../ColorSchemeToggle/ColorSchemeSwitch'; import ConfigChanger from '../Config/ConfigChanger'; @@ -40,14 +36,6 @@ function SettingsMenu(props: any) { return ( - } - title="Update available" - radius="lg" - hidden={current === latest} - > - Version {latest} is available. Current: {current} - Search engine { - // Fetch Data here when component first mounted - fetch(`https://api.github.com/repos/${REPO_URL}/releases/latest`).then((res) => { - res.json().then((data) => { - setLatestVersion(data.tag_name); - if (data.tag_name !== CURRENT_VERSION) { - setUpdate(true); - } - }); - }); - }, []); return ( <> setOpened(false)} > - + setOpened(true)} > - - - +