import React from 'react';
import URILink from './URILink';
import { I18n } from '../locale';
import {
getFromUri,
titleCase,
uriType,
} from '../util/helpers';
export default ({
by,
from,
className = '',
inline,
}) => {
if (!from) return null;
const { uri, name } = from;
const type = from?.type || uriType(uri);
let link = null;
switch (type) {
case 'discover':
link = (