mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-17 21:13:48 +00:00
Implemented short URLs creation
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import React from 'react';
|
||||
import { isNil } from 'ramda';
|
||||
|
||||
export default function CreateShortUrlResult ({ creationResult }) {
|
||||
if (creationResult.loading) {
|
||||
export default function CreateShortUrlResult ({ loading, error, result }) {
|
||||
if (loading) {
|
||||
return <div className="text-center">Loading...</div>
|
||||
}
|
||||
|
||||
if (creationResult.error) {
|
||||
if (error) {
|
||||
return <div className="text-center color-danger">An error occurred while creating the URL :(</div>
|
||||
}
|
||||
|
||||
if (isNil(creationResult.result)) {
|
||||
if (isNil(result)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user