Changed naming on share modal
This commit is contained in:
parent
abf58c5224
commit
66428b730e
2 changed files with 14 additions and 10 deletions
|
|
@ -3,6 +3,7 @@ import { Input } from "../../components/ui/input";
|
|||
import { Label } from "../../components/ui/label";
|
||||
import { Textarea } from "../../components/ui/textarea";
|
||||
import { InputProps } from "../../types/components";
|
||||
import { cn } from "../../utils/utils";
|
||||
|
||||
export const EditFlowSettings: React.FC<InputProps> = ({
|
||||
name,
|
||||
|
|
@ -32,7 +33,7 @@ export const EditFlowSettings: React.FC<InputProps> = ({
|
|||
<>
|
||||
<Label>
|
||||
<div className="edit-flow-arrangement">
|
||||
<span className="font-medium">Name</span>{" "}
|
||||
<span className="font-medium">Name{setName ? "" : ":"}</span>{" "}
|
||||
{isMaxLength && (
|
||||
<span className="edit-flow-span">Character limit reached</span>
|
||||
)}
|
||||
|
|
@ -57,7 +58,7 @@ export const EditFlowSettings: React.FC<InputProps> = ({
|
|||
<Label>
|
||||
<div className="edit-flow-arrangement mt-3">
|
||||
<span className="font-medium ">
|
||||
Description {setDescription ? "(optional)" : ""}
|
||||
Description{setDescription ? " (optional)" : ":"}
|
||||
</span>
|
||||
</div>
|
||||
{setDescription ? (
|
||||
|
|
@ -71,8 +72,13 @@ export const EditFlowSettings: React.FC<InputProps> = ({
|
|||
rows={3}
|
||||
/>
|
||||
) : (
|
||||
<span className="font-normal text-muted-foreground word-break-break-word">
|
||||
{description}
|
||||
<span
|
||||
className={cn(
|
||||
"font-normal text-muted-foreground word-break-break-word",
|
||||
description === "" ? "font-light italic" : ""
|
||||
)}
|
||||
>
|
||||
{description === "" ? "No description" : description}
|
||||
</span>
|
||||
)}
|
||||
</Label>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export default function ShareModal({
|
|||
const [description, setDescription] = useState(component?.description ?? "");
|
||||
const [internalOpen, internalSetOpen] = useState(children ? false : true);
|
||||
const [openConfirmationModal, setOpenConfirmationModal] = useState(false);
|
||||
const nameComponent = is_component ? "Component" : "Flow";
|
||||
const nameComponent = is_component ? "component" : "flow";
|
||||
|
||||
const [tags, setTags] = useState<{ id: string; name: string }[]>([]);
|
||||
const [loadingTags, setLoadingTags] = useState<boolean>(false);
|
||||
|
|
@ -121,9 +121,7 @@ export default function ShareModal({
|
|||
});
|
||||
|
||||
function successShare() {
|
||||
if (is_component) {
|
||||
addFlow(true, flow, update);
|
||||
} else {
|
||||
if (!is_component) {
|
||||
saveFlow(flow!, true);
|
||||
}
|
||||
setSuccessData({
|
||||
|
|
@ -293,8 +291,8 @@ export default function ShareModal({
|
|||
</>
|
||||
) : (
|
||||
<>
|
||||
{is_component && !loadingNames ? "Save and " : ""}Share{" "}
|
||||
{!is_component && !loadingNames ? "Flow" : ""}
|
||||
Share{" "}
|
||||
{!loadingNames && (!is_component ? "Flow" : "Component")}
|
||||
</>
|
||||
)}
|
||||
</Button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue