Skip to content

Commit

Permalink
feat: spinner component -> svg
Browse files Browse the repository at this point in the history
  • Loading branch information
proffapt committed Jun 29, 2024
1 parent 87499a8 commit f0fa1d9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
5 changes: 5 additions & 0 deletions frontend/src/assets/spinner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 0 additions & 11 deletions frontend/src/components/Spinner.tsx

This file was deleted.

10 changes: 5 additions & 5 deletions frontend/src/pages/Register.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component, createSignal, onMount } from "solid-js";
import { BACKEND_URL } from "../constants";
import { Spinner } from "../components/Spinner";
import spinner from "../assets/spinner.svg"
import check from "../assets/check.png"
import cross from "../assets/cross.png"

Expand Down Expand Up @@ -31,7 +31,7 @@ export const Register: Component = () => {
setMsg("Search your institute email for credentials")

setTimeout(() => {
document.location = "https://naarad.metakgp.org"
document.location = "https://naarad.metakgp.org/login"
}, 3000);
}
else if(data.status == 401){
Expand All @@ -43,15 +43,15 @@ export const Register: Component = () => {
else {
setIsLoad(false);
setIsErr(true)
setStatus("Failed to Register User")
setStatus("User Registration Failed")
data.text().then((bodyData) => {
setMsg(bodyData)
})
}
}).catch((err) => {
setIsLoad(false);
setIsErr(true)
setStatus("Failed to Register User")
setStatus("User Registration Failed")
setMsg(err.toString())
})
})
Expand All @@ -69,7 +69,7 @@ export const Register: Component = () => {
</div>
<div class="reg-status">
<div class="reg-status-svg">
{getIsLoad() == true ? <Spinner /> : (getIsErr() == true ? <img src={cross}/> : <img src={check} />)}
{getIsLoad() == true ? <img src={spinner}/> : (getIsErr() == true ? <img src={cross}/> : <img src={check}/>)}
</div>
<div class="reg-status-title">{getStatus()}</div>
<div class="reg-status-text">{getMsg()}</div>
Expand Down

0 comments on commit f0fa1d9

Please sign in to comment.