tinacms 0.66.6 → 0.66.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.es.js +3 -2
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -2854,6 +2854,7 @@ const RenderForm$1 = ({ cms, collection, template, fields, mutationInfo }) => {
|
|
|
2854
2854
|
onSubmit: async (values) => {
|
|
2855
2855
|
try {
|
|
2856
2856
|
await createDocument(cms, collection, template, mutationInfo, values);
|
|
2857
|
+
cms.alerts.success("Document created!");
|
|
2857
2858
|
navigate(`/collections/${collection.name}`);
|
|
2858
2859
|
} catch (error) {
|
|
2859
2860
|
cms.alerts.error(`[${error.name}] CreateDocument failed: ${error.message}`, 30 * 1e3);
|
|
@@ -2963,7 +2964,7 @@ const RenderForm = ({
|
|
|
2963
2964
|
mutationInfo
|
|
2964
2965
|
}) => {
|
|
2965
2966
|
var _a, _b;
|
|
2966
|
-
|
|
2967
|
+
useNavigate();
|
|
2967
2968
|
const [formIsPristine, setFormIsPristine] = useState(true);
|
|
2968
2969
|
const form = useMemo(() => {
|
|
2969
2970
|
return new Form({
|
|
@@ -2974,7 +2975,7 @@ const RenderForm = ({
|
|
|
2974
2975
|
onSubmit: async (values) => {
|
|
2975
2976
|
try {
|
|
2976
2977
|
await updateDocument(cms, relativePath, collection, mutationInfo, values);
|
|
2977
|
-
|
|
2978
|
+
cms.alerts.success("Document updated!");
|
|
2978
2979
|
} catch (error) {
|
|
2979
2980
|
cms.alerts.error(`[${error.name}] UpdateDocument failed: ${error.message}`, 30 * 1e3);
|
|
2980
2981
|
console.error(error);
|
package/dist/index.js
CHANGED
|
@@ -2874,6 +2874,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2874
2874
|
onSubmit: async (values) => {
|
|
2875
2875
|
try {
|
|
2876
2876
|
await createDocument(cms, collection, template, mutationInfo, values);
|
|
2877
|
+
cms.alerts.success("Document created!");
|
|
2877
2878
|
navigate(`/collections/${collection.name}`);
|
|
2878
2879
|
} catch (error) {
|
|
2879
2880
|
cms.alerts.error(`[${error.name}] CreateDocument failed: ${error.message}`, 30 * 1e3);
|
|
@@ -2983,7 +2984,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2983
2984
|
mutationInfo
|
|
2984
2985
|
}) => {
|
|
2985
2986
|
var _a, _b;
|
|
2986
|
-
|
|
2987
|
+
reactRouterDom.useNavigate();
|
|
2987
2988
|
const [formIsPristine, setFormIsPristine] = React.useState(true);
|
|
2988
2989
|
const form = React.useMemo(() => {
|
|
2989
2990
|
return new toolkit.Form({
|
|
@@ -2994,7 +2995,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2994
2995
|
onSubmit: async (values) => {
|
|
2995
2996
|
try {
|
|
2996
2997
|
await updateDocument(cms, relativePath, collection, mutationInfo, values);
|
|
2997
|
-
|
|
2998
|
+
cms.alerts.success("Document updated!");
|
|
2998
2999
|
} catch (error) {
|
|
2999
3000
|
cms.alerts.error(`[${error.name}] UpdateDocument failed: ${error.message}`, 30 * 1e3);
|
|
3000
3001
|
console.error(error);
|