use canonical urls in asset preview
This commit is contained in:
parent
4e16cde757
commit
b41f985d2b
1 changed files with 5 additions and 3 deletions
|
@ -1,9 +1,11 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
import createCanonicalLink from '../../../../utils/createCanonicalLink';
|
||||||
|
|
||||||
const AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, contentType, thumbnail, title } }) => {
|
const AssetPreview = ({ defaultThumbnail, claimData }) => {
|
||||||
const embedUrl = `/${claimId}/${name}.${fileExt}`;
|
const { name, fileExt, contentType, thumbnail, title } = claimData;
|
||||||
const showUrl = `/${claimId}/${name}`;
|
const showUrl = createCanonicalLink({ asset: { claimData } });
|
||||||
|
const embedUrl = `${showUrl}.${fileExt}`;
|
||||||
return (
|
return (
|
||||||
<Link to={showUrl} className='asset-preview'>
|
<Link to={showUrl} className='asset-preview'>
|
||||||
{(() => {
|
{(() => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue