diff --git a/client/src_editor/Editor_Blocks_Utils.re b/client/src_editor/Editor_Blocks_Utils.re index f1011857..37d35bdb 100644 --- a/client/src_editor/Editor_Blocks_Utils.re +++ b/client/src_editor/Editor_Blocks_Utils.re @@ -236,3 +236,12 @@ let concatCodeBlocksToString = blocks => } ) ); +exception Not_Implemented; + +let getNameFromLink = link => + Editor_Types.Link.( + switch (link) { + | Internal(internalLink) => internalLink.name + | External () => raise(Not_Implemented) + } + ); diff --git a/client/src_editor/Editor_Links.re b/client/src_editor/Editor_Links.re index dd1cd6f1..f16eead9 100644 --- a/client/src_editor/Editor_Links.re +++ b/client/src_editor/Editor_Links.re @@ -65,6 +65,7 @@ module EmptyLink = { | UpdateName(string); let component = ReasonReact.reducerComponent("Editor_EmptyLink"); + let make = (~status, ~onSubmit, ~onFetched=?, ~name="", ~id="", _children) => { ...component, initialState: () => {name, id},