small bug fixes
This commit is contained in:
parent
429211f9a8
commit
80f3c1bdda
|
@ -102,6 +102,9 @@ function CollectionShare(props: Props) {
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
|
if (!props.collection) {
|
||||||
|
return <></>;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<MessageDialog
|
<MessageDialog
|
||||||
show={props.show}
|
show={props.show}
|
||||||
|
@ -177,13 +180,13 @@ function CollectionShare(props: Props) {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{props.collection?.publicAccessUrls.length > 0 && (
|
{props.collection.publicAccessUrls?.length > 0 && (
|
||||||
<div style={{ width: '100%', wordBreak: 'break-all' }}>
|
<div style={{ width: '100%', wordBreak: 'break-all' }}>
|
||||||
<p>{constants.PUBLIC_URL}</p>
|
<p>{constants.PUBLIC_URL}</p>
|
||||||
|
|
||||||
<Table striped bordered hover variant="dark" size="sm">
|
<Table striped bordered hover variant="dark" size="sm">
|
||||||
<tbody>
|
<tbody>
|
||||||
{props.collection?.publicAccessUrls.map(
|
{props.collection.publicAccessUrls?.map(
|
||||||
(publicAccessUrl) => (
|
(publicAccessUrl) => (
|
||||||
<tr key={publicAccessUrl.url}>
|
<tr key={publicAccessUrl.url}>
|
||||||
{
|
{
|
||||||
|
@ -207,13 +210,13 @@ function CollectionShare(props: Props) {
|
||||||
</Table>
|
</Table>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{props.collection?.sharees.length > 0 ? (
|
{props.collection.sharees?.length > 0 ? (
|
||||||
<>
|
<>
|
||||||
<p>{constants.SHAREES}</p>
|
<p>{constants.SHAREES}</p>
|
||||||
|
|
||||||
<Table striped bordered hover variant="dark" size="sm">
|
<Table striped bordered hover variant="dark" size="sm">
|
||||||
<tbody>
|
<tbody>
|
||||||
{props.collection?.sharees.map((sharee) => (
|
{props.collection.sharees?.map((sharee) => (
|
||||||
<ShareeRow
|
<ShareeRow
|
||||||
key={sharee.email}
|
key={sharee.email}
|
||||||
sharee={sharee}
|
sharee={sharee}
|
||||||
|
|
|
@ -598,7 +598,6 @@ export const createShareableUrl = async (collection: Collection) => {
|
||||||
'X-Auth-Token': token,
|
'X-Auth-Token': token,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
console.log(resp);
|
|
||||||
return resp.data as PublicAccessUrl;
|
return resp.data as PublicAccessUrl;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logError(e, 'createShareableUrl failed ');
|
logError(e, 'createShareableUrl failed ');
|
||||||
|
|
Loading…
Reference in a new issue