Further updates on production board + AAMVA decoding built into project BOD-75

This commit is contained in:
Patrick Fic
2020-06-19 17:21:11 -07:00
parent 8399d03081
commit cab080f2de
10 changed files with 959 additions and 138 deletions

View File

@@ -0,0 +1,43 @@
import { useNProgress } from "@tanem/react-nprogress";
import React from "react";
export default function IndefiniteLoading({ loading }) {
const { animationDuration, isFinished, progress } = useNProgress({
isAnimating: loading,
});
return (
<div
style={{
opacity: isFinished ? 0 : 1,
pointerEvents: "none",
transition: `opacity ${animationDuration}ms linear`,
}}>
<div
style={{
background: "#29d",
height: 4,
left: 0,
marginLeft: `${(-1 + progress) * 100}%`,
position: "fixed",
top: 0,
transition: `margin-left ${animationDuration}ms linear`,
width: "100%",
zIndex: 1031,
}}>
<div
style={{
boxShadow: "0 0 10px #29d, 0 0 5px #29d",
display: "block",
height: "100%",
opacity: 1,
position: "absolute",
right: 0,
transform: "rotate(3deg) translate(0px, -4px)",
width: 100,
}}
/>
</div>
</div>
);
}