-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96fda3e
commit e4b1e96
Showing
15 changed files
with
319 additions
and
68 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||
import { faCircleCheck } from "@fortawesome/free-solid-svg-icons"; | ||
|
||
export const ApprovedIcon = () => { | ||
return ( | ||
<FontAwesomeIcon | ||
icon={faCircleCheck} | ||
className="mx-1 text-green-400" | ||
size="sm" | ||
/> | ||
); | ||
}; |
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
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,23 @@ | ||
export const stringDOB = (DOB) => { | ||
let dobDate = new Date(DOB); | ||
let options = { day: "2-digit", month: "long", year: "numeric" }; | ||
return dobDate.toLocaleDateString("en-US", options); | ||
}; | ||
|
||
export const getAge = (DOB) => { | ||
let dobDate = new Date(DOB); | ||
let currentDate = new Date(); | ||
let age = currentDate.getFullYear() - dobDate.getFullYear(); | ||
if ( | ||
currentDate.getMonth() < dobDate.getMonth() || | ||
(currentDate.getMonth() === dobDate.getMonth() && | ||
currentDate.getDate() < dobDate.getDate()) | ||
) { | ||
age--; | ||
} | ||
if (age < 1) { | ||
return "Infant"; | ||
} else { | ||
return age + " years"; | ||
} | ||
}; |
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.