mirror of
https://github.com/hazemKrimi/touch-programming.git
synced 2026-05-01 18:20:26 +00:00
Add fonts, spinner and small screen detection
This commit is contained in:
@@ -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))}
|
||||
|
||||
Reference in New Issue
Block a user