2022-08-31 02:35:06 -07:00
|
|
|
import classNames from 'clsx';
|
2022-11-25 09:04:11 -08:00
|
|
|
import React from 'react';
|
2022-01-10 14:25:06 -08:00
|
|
|
|
2021-11-15 17:08:27 -08:00
|
|
|
import { randomIntFromInterval, generateText } from '../utils';
|
|
|
|
|
2022-05-01 10:53:53 -07:00
|
|
|
/** Fake link preview to display while data is loading. */
|
|
|
|
const PlaceholderCard: React.FC = () => (
|
2022-03-21 11:09:01 -07:00
|
|
|
<div className={classNames('status-card', {
|
|
|
|
'animate-pulse': true,
|
|
|
|
})}
|
|
|
|
>
|
2022-07-22 10:30:16 -07:00
|
|
|
<div className='w-2/5 primary-500 rounded-l'> </div>
|
2021-11-15 17:08:27 -08:00
|
|
|
|
2022-07-22 10:30:16 -07:00
|
|
|
<div className='w-3/5 p-4 flex flex-col justify-between text-primary-50 break-words'>
|
2022-03-21 11:09:01 -07:00
|
|
|
<p>{generateText(randomIntFromInterval(5, 25))}</p>
|
|
|
|
<p>{generateText(randomIntFromInterval(5, 75))}</p>
|
|
|
|
<p>{generateText(randomIntFromInterval(5, 15))}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
2021-11-15 17:08:27 -08:00
|
|
|
|
2022-03-21 11:09:01 -07:00
|
|
|
export default React.memo(PlaceholderCard);
|