File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 1
1
import { faCircleArrowUp } from '@fortawesome/free-solid-svg-icons' ;
2
2
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' ;
3
- import axios from 'axios' ;
4
3
import dayjs from 'dayjs' ;
5
4
import timezone from 'dayjs/plugin/timezone' ;
6
5
import utc from 'dayjs/plugin/utc' ;
@@ -25,21 +24,20 @@ export const UpdateCheck = () => {
25
24
org = 'cu-cit-cloud-team' ,
26
25
repo = 'azure-openai-gpt4-chat'
27
26
) => {
28
- const latest = await axios
29
- . get ( `https://api.github.com/repos/${ org } /${ repo } /releases/latest` )
30
- . then ( ( response ) => {
31
- const version = response . data . tag_name ;
32
- const published = response . data . published_at ;
33
-
27
+ const latest = await fetch (
28
+ `https://api.github.com/repos/${ org } /${ repo } /releases/latest`
29
+ )
30
+ . then ( async ( response ) => {
31
+ const data = await response . json ( ) ;
32
+ const { version , published } = data ;
34
33
return {
35
34
version,
36
35
published,
37
36
} ;
38
37
} )
39
- // biome-ignore lint/correctness/noUnusedVariables: used for debugging
40
38
. catch ( ( error ) => {
41
39
setUpdateAvailable ( false ) ;
42
- // console.error(error);
40
+ console . error ( error ) ;
43
41
} ) ;
44
42
45
43
setUpdateAvailable (
You can’t perform that action at this time.
0 commit comments