Position spinner

This commit is contained in:
Manav Rathi 2024-05-08 19:58:56 +05:30
parent 415258c86d
commit 74fd98c398
No known key found for this signature in database
2 changed files with 15 additions and 12 deletions

View file

@ -48,6 +48,9 @@ export const PairingCode: React.FC<PairingCodeProps> = ({ code }) => {
};
const PairingCode_ = styled("div")`
border-radius: 10px;
overflow: hidden;
font-size: 4rem;
font-weight: bold;
font-family: monospace;

View file

@ -71,18 +71,7 @@ export default function Index() {
<h1>
Enter this code on <b>Ente Photos</b> to pair this screen
</h1>
<div
style={{
borderRadius: "10px",
overflow: "hidden",
}}
>
{pairingCode ? (
<PairingCode code={pairingCode} />
) : (
<EnteSpinner />
)}
</div>
{pairingCode ? <PairingCode code={pairingCode} /> : <Spinner />}
<p
style={{
fontSize: "1.2rem",
@ -118,3 +107,14 @@ const Container = styled("div")`
font-weight: normal;
}
`;
const Spinner: React.FC = () => (
<Spinner_>
<EnteSpinner />
</Spinner_>
);
const Spinner_ = styled("div")`
/* Roughly same height as the pairing code section to roduce layout shift */
margin-block: 1.7rem;
`;