mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-01 13:58:22 +03:00
19 lines
474 B
JavaScript
19 lines
474 B
JavaScript
|
import React from 'react';
|
||
|
import { isNil } from 'ramda';
|
||
|
|
||
|
export default function CreateShortUrlResult ({ creationResult }) {
|
||
|
if (creationResult.loading) {
|
||
|
return <div className="text-center">Loading...</div>
|
||
|
}
|
||
|
|
||
|
if (creationResult.error) {
|
||
|
return <div className="text-center color-danger">An error occurred while creating the URL :(</div>
|
||
|
}
|
||
|
|
||
|
if (isNil(creationResult.result)) {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
return <div className="text-center">Great!</div>;
|
||
|
};
|