How to use the react-orbitjs/dist.idFromRecordIdentity function in react-orbitjs

To help you get started, we’ve selected a few react-orbitjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sillsdev / appbuilder-portal / source / SIL.AppBuilder.Portal.Frontend / src / ui / routes / projects / new / display.tsx View on Github external
const onSubmit = useCallback(async () => {
    setDisableSubmit(true);

    try {
      const project = await create({ name, language, isPublic, description }, groupId, typeId);
      const id = idFromRecordIdentity(dataStore, project);

      history.push(`/projects/${id}`);
    } catch (e) {
      toast.error(e);
      setDisableSubmit(false);
    }
  }, [create, name, language, isPublic, description, groupId, typeId, dataStore, history]);