11---
2- import { Icon } from ' astro-icon/components' ;
3- import { format , parseISO } from ' date-fns' ;
4- import { Octokit } from ' octokit' ;
2+ import { Icon } from " astro-icon/components" ;
3+ import { format , parseISO } from " date-fns" ;
4+ import { Octokit } from " octokit" ;
55
6- import { URLs , siteMetadata } from ' ~/constants' ;
6+ import { URLs , siteMetadata } from " ~/constants" ;
77import type {
88 DownloadLink ,
99 DownloadLinks ,
1010 HeroData ,
1111 ReleaseAsset ,
12- } from ' ../types' ;
12+ } from " ../types" ;
1313
1414const octokit = new Octokit ();
1515
@@ -21,31 +21,31 @@ const getDownloadLinks = (assets: ReleaseAsset[]): DownloadLinks => {
2121
2222 const supportedOSs: DownloadLink [] = [
2323 {
24- os: ' macOS' ,
25- name: ' macOS (Universal)' ,
24+ os: " macOS" ,
25+ name: " macOS (Universal)" ,
2626 url: getAssetLink (/ Gitify-\d + .\d + .\d + -universal. dmg/ g ),
2727 isPrimary: true ,
2828 },
2929 {
30- os: ' Windows' ,
31- name: ' Windows' ,
30+ os: " Windows" ,
31+ name: " Windows" ,
3232 url: getAssetLink (/ Gitify-Setup-\d + .\d + .\d + . exe/ g ),
3333 isPrimary: true ,
3434 },
3535 {
36- os: ' Linux' ,
37- name: ' Linux (AppImage)' ,
36+ os: " Linux" ,
37+ name: " Linux (AppImage)" ,
3838 url: getAssetLink (/ Gitify-\d + .\d + .\d + . AppImage/ g ),
3939 isPrimary: true ,
4040 },
4141 {
42- os: ' Linux' ,
43- name: ' Linux (deb)' ,
42+ os: " Linux" ,
43+ name: " Linux (deb)" ,
4444 url: getAssetLink (/ gitify_\d + .\d + .\d + _amd64. deb/ g ),
4545 },
4646 {
47- os: ' Linux' ,
48- name: ' Linux (rpm)' ,
47+ os: " Linux" ,
48+ name: " Linux (rpm)" ,
4949 url: getAssetLink (/ gitify-\d + .\d + .\d + . x86_64. rpm/ g ),
5050 },
5151 ];
@@ -79,17 +79,17 @@ const loadInitialData = async (): Promise<HeroData> => {
7979 downloadLinks ,
8080 version: latestRelease .data .name ,
8181 releaseDate: latestRelease .data .published_at
82- ? format (latestRelease .data .published_at , ' dd/MM/yyyy' )
83- : ' ' ,
82+ ? format (latestRelease .data .published_at , " dd/MM/yyyy" )
83+ : " " ,
8484 };
8585 } catch (error ) {
8686 return {
8787 downloadLinks: {
8888 alt: [],
8989 primary: [],
9090 },
91- version: ' ' ,
92- releaseDate: ' ' ,
91+ version: " " ,
92+ releaseDate: " " ,
9393 };
9494 }
9595};
0 commit comments