diff --git a/src/AppWrapper.js b/src/AppWrapper.js
index 979a417c9..00760477a 100644
--- a/src/AppWrapper.js
+++ b/src/AppWrapper.js
@@ -4,11 +4,14 @@ import { CssVariables } from '@dhis2/ui'
import React from 'react'
import App from './App.js'
import { CurrentUserProvider } from './components/CurrentUserProvider.js'
+import { ReferrerProvider } from './providers/index.js'
const AppWrapper = () => (
-
-
+
+
+
+
)
diff --git a/src/components/Form.js b/src/components/Form.js
index 6e672f656..f890e2fd0 100644
--- a/src/components/Form.js
+++ b/src/components/Form.js
@@ -19,7 +19,6 @@ import {
import cx from 'classnames'
import PropTypes from 'prop-types'
import React, { useState, useCallback, useMemo } from 'react'
-import { useHistory } from 'react-router-dom'
import styles from './Form.module.css'
import SearchableOrgUnitTree from './SearchableOrgUnitTree/index.js'
@@ -288,10 +287,8 @@ const Form = ({
submitButtonLabel,
cancelButtonLabel,
onSubmit,
+ onCancel,
}) => {
- const history = useHistory()
- const handleCancel = () => history.goBack()
-
if (loading) {
return (
@@ -337,7 +334,7 @@ const Form = ({
>
{submitButtonLabel}
-