diff --git a/src/components/landing-page/create-production.tsx b/src/components/landing-page/create-production.tsx
index 518af5ca..082063a1 100644
--- a/src/components/landing-page/create-production.tsx
+++ b/src/components/landing-page/create-production.tsx
@@ -83,9 +83,18 @@ export const CreateProduction = () => {
}
}, [createdProductionId, dispatch, reset]);
- if (loading) {
- return ;
- }
+ useEffect(() => {
+ if (createdProductionId) {
+ reset({
+ productionName: "",
+ defaultLine: "",
+ lines: [],
+ });
+ dispatch({
+ type: "PRODUCTION_CREATED",
+ });
+ }
+ }, [createdProductionId, dispatch, reset]);
return (
@@ -149,8 +158,13 @@ export const CreateProduction = () => {
Add Line
-
+
Create Production
+ {loading && }
{createdProductionId !== null && (
diff --git a/src/components/landing-page/form-elements.tsx b/src/components/landing-page/form-elements.tsx
index 38419dd8..e3cc73d7 100644
--- a/src/components/landing-page/form-elements.tsx
+++ b/src/components/landing-page/form-elements.tsx
@@ -49,6 +49,11 @@ export const ActionButton = styled.button`
&:hover {
cursor: pointer;
}
+
+ &.submit {
+ position: relative;
+ color: rgba(255, 255, 255, 0);
+ }
`;
export const StyledWarningMessage = styled.div`