Add fonts, spinner and small screen detection

This commit is contained in:
2025-02-20 22:41:33 +01:00
parent 80dd1b48aa
commit f958486fcc
14 changed files with 118 additions and 10 deletions
+7
View File
@@ -7,6 +7,7 @@ import { KEYS_TO_DISABLE } from 'constants/default';
import { renderCharacter } from './utils';
import './index.css';
import Spinner from 'components/Spinner';
type CodeProps = {
code: string;
@@ -72,6 +73,12 @@ function Code({ code, loaded }: CodeProps) {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [timer, characters]);
if (!code) return (
<div className='code-container'>
<Spinner />
</div>
);
return (
<div className='code-container'>
{code.split('').map((char, index) => renderCharacter(code, characters, loaded, char, index))}