-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* disable strict build in github actions for now * set variable directly in build command * Automated frontend build * remove key entries if nil * auth differently when CI is set * add libraries required for ssh auth * removing stale file * Automated frontend build * Dev (#442) * fix: use correct indication attribute name (#408) * fix: add URL cites back (#409) * add release information component for footer * run prettier * cleanup: make about links consistent (#413) * make footer no longer sticky * fix: correct source versioning (#421) * fix: clean up GtoP import (#419) * fix: use latest GO address (#424) * feat: bump drugbank version (#422) * feat: alphabetize sources * refactor: alphabetize sources * style: running prettier to prettify the sort data function * fix: sort on pmid and source columns * feat: add sources to interaction page * feat: reduce precision of interaction score on interaction page to 2 decimal places --------- Co-authored-by: James Stevenson <[email protected]> Co-authored-by: Adam Coffman <[email protected]> * Automated frontend build --------- Co-authored-by: Adam Coffman <[email protected]> Co-authored-by: acoffman <[email protected]> Co-authored-by: katiestahl <[email protected]> Co-authored-by: James Stevenson <[email protected]>
- Loading branch information
1 parent
f3ed0a2
commit e6ce3ef
Showing
36 changed files
with
457 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
client/src/components/Shared/ReleaseInformation/ReleaseInformation.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.release-info { | ||
font-size: 16px; | ||
|
||
a { | ||
color: white; | ||
text-decoration: underline; | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
client/src/components/Shared/ReleaseInformation/ReleaseInformation.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import './ReleaseInformation.scss'; | ||
import React, { useState, useEffect } from 'react'; | ||
|
||
const ReleaseInformation: React.FC = () => { | ||
interface GithubRelease { | ||
html_url: string; | ||
name: string; | ||
published_at: string; | ||
} | ||
|
||
const [currentRelease, setCurrentRelease] = useState< | ||
GithubRelease | undefined | ||
>(undefined); | ||
|
||
const fetchRelease = async () => { | ||
const response = await fetch( | ||
'https://api.github.com/repos/dgidb/dgidb-v5/releases?per_page=1' | ||
); | ||
if (response.ok) { | ||
const body = await response.json(); | ||
setCurrentRelease(body[0]); | ||
} else { | ||
setCurrentRelease(undefined); | ||
} | ||
}; | ||
|
||
useEffect(() => { | ||
fetchRelease(); | ||
}, []); | ||
|
||
return ( | ||
<div> | ||
{currentRelease && ( | ||
<div className="release-info"> | ||
DGIdb {currentRelease.name} ( | ||
{new Date(currentRelease.published_at).toLocaleString().split(',')[0]} | ||
) • | ||
<a href={currentRelease.html_url} target="_blank"> | ||
Release Notes | ||
</a> | ||
• | ||
<a href="https://github.com/dgidb/dgidb-v5/releases/" target="_blank"> | ||
History | ||
</a> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default ReleaseInformation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.