Skip to content

Commit

Permalink
changes variants
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemma committed Sep 25, 2023
1 parent 5174c4f commit 0b84963
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
4 changes: 2 additions & 2 deletions frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ html {
margin-top: -1px;
}
.searchIcon:hover {
width: 40px;
margin-top: -4px;
width: 37px;
margin-top: -3px;
}

.forwardIcon {
Expand Down
25 changes: 21 additions & 4 deletions frontend/src/components/GenomicVariations/VariantsResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import TableResultsVariant from '../Results/VariantResults/TableResultsVariant'

function VariantsResults (props) {
const [error, setError] = useState('')

const [timeOut, setTimeOut] = useState(false)
const [logInRequired, setLoginRequired] = useState(true)
const [messageLogin, setMessageLogin] = useState('')
const [results, setResults] = useState([])
Expand Down Expand Up @@ -89,15 +89,20 @@ function VariantsResults (props) {
}
}
jsonData1 = JSON.stringify(jsonData1)

console.log(jsonData1)
// const token = auth.userData.access_token
// console.log(token)
//const headers = { 'Authorization': `Bearer ${token}` }
// const res = await axios.post("https://beacons.bsc.es/beacon-network/v2.0.0/g_variants", jsonData1, {headers: headers})
// const res = await axios.post(
// configData.API_URL + '/g_variants',
//jsonData1
// )
const res = await axios.post(
configData.API_URL + '/g_variants',
'https://beacon-apis-test.ega-archive.org/api/g_variants',
jsonData1
)
setTimeOut(true)
console.log(res)
if (res.data.responseSummary.exists === false) {
setBoolean(false)
Expand Down Expand Up @@ -217,6 +222,7 @@ function VariantsResults (props) {
}
}
} catch (error) {
setTimeOut(true)
console.log(error)
setError(error)
}
Expand All @@ -235,7 +241,18 @@ function VariantsResults (props) {
<h3>{messageLogin}</h3>
</div>
)}
{logInRequired === false && (
{timeOut === false && (
<div className='loaderLogo'>
<div className='loader2'>
<div id='ld3'>
<div></div>
<div></div>
<div></div>
</div>
</div>
</div>
)}
{logInRequired === false && timeOut && (
<div>
<div className='selectGranularity'>
<h4>Granularity:</h4>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/Layout/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,7 @@ function Layout (props) {
<div>
<VariantsResults
query={query}
resultSets={resultSet}
setHideForm={setHideForm}
showBar={showBar}
aminoacid2={aminoacid2}
Expand Down

0 comments on commit 0b84963

Please sign in to comment.