parent
151cc8b149
commit
12a99b3635
|
@ -2,6 +2,7 @@ import classnames from 'classnames';
|
||||||
import { List as ImmutableList } from 'immutable';
|
import { List as ImmutableList } from 'immutable';
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
|
|
||||||
|
import Blurhash from 'soapbox/components/blurhash';
|
||||||
import Icon from 'soapbox/components/icon';
|
import Icon from 'soapbox/components/icon';
|
||||||
import { HStack } from 'soapbox/components/ui';
|
import { HStack } from 'soapbox/components/ui';
|
||||||
import { normalizeAttachment } from 'soapbox/normalizers';
|
import { normalizeAttachment } from 'soapbox/normalizers';
|
||||||
|
@ -161,6 +162,13 @@ const Card: React.FC<ICard> = ({
|
||||||
|
|
||||||
let embed: React.ReactNode = '';
|
let embed: React.ReactNode = '';
|
||||||
|
|
||||||
|
const canvas = (
|
||||||
|
<Blurhash
|
||||||
|
className='absolute w-full h-full inset-0 -z-10'
|
||||||
|
hash={card.blurhash}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
|
||||||
const thumbnail = (
|
const thumbnail = (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
@ -184,6 +192,7 @@ const Card: React.FC<ICard> = ({
|
||||||
|
|
||||||
embed = (
|
embed = (
|
||||||
<div className='status-card__image'>
|
<div className='status-card__image'>
|
||||||
|
{canvas}
|
||||||
{thumbnail}
|
{thumbnail}
|
||||||
|
|
||||||
<div className='absolute inset-0 flex items-center justify-center'>
|
<div className='absolute inset-0 flex items-center justify-center'>
|
||||||
|
@ -226,6 +235,7 @@ const Card: React.FC<ICard> = ({
|
||||||
} else if (card.image) {
|
} else if (card.image) {
|
||||||
embed = (
|
embed = (
|
||||||
<div className='status-card__image'>
|
<div className='status-card__image'>
|
||||||
|
{canvas}
|
||||||
{thumbnail}
|
{thumbnail}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue