diff --git a/app/frontend/components/form/form.tsx b/app/frontend/components/form/form.tsx
new file mode 100644
index 0000000..c8988f1
--- /dev/null
+++ b/app/frontend/components/form/form.tsx
@@ -0,0 +1,19 @@
+import React, { ReactNode } from 'react';
+
+interface Props {
+ children: ReactNode;
+ onSubmit?: () => void;
+}
+
+export function Form({ children, onSubmit }: Props): JSX.Element {
+ return (
+
+ );
+}
diff --git a/app/views/inventories/edit.tsx b/app/views/inventories/edit.tsx
index 5163066..c07756b 100644
--- a/app/views/inventories/edit.tsx
+++ b/app/views/inventories/edit.tsx
@@ -8,6 +8,7 @@ import { useReaction } from '../../frontend/sprinkles/reaction';
import { Container } from '../../frontend/components/container/container';
import { useFormatter, useTranslate } from '../../frontend/util/dependencies';
import { DateField } from '../../frontend/components/date_field/date_field';
+import { Form } from '../../frontend/components/form/form';
interface Form {
name: string;
@@ -46,32 +47,34 @@ export default function ({
});
return (
-
-
-
-
-
-
);
}
diff --git a/app/views/inventories/new.tsx b/app/views/inventories/new.tsx
index 5da0792..51b974c 100644
--- a/app/views/inventories/new.tsx
+++ b/app/views/inventories/new.tsx
@@ -7,6 +7,7 @@ import { DateField } from '../../frontend/components/date_field/date_field';
import { useModalInfo } from '../../frontend/components/modal/modal';
import { useReaction } from '../../frontend/sprinkles/reaction';
import { useTranslate } from '../../frontend/util/dependencies';
+import { Form } from '../../frontend/components/form/form';
interface Form {
userId: string;
@@ -38,7 +39,7 @@ export default function ({
},
});
return (
- <>
+
);
}
diff --git a/app/views/leaves/new.tsx b/app/views/leaves/new.tsx
index 21bd720..487b60a 100644
--- a/app/views/leaves/new.tsx
+++ b/app/views/leaves/new.tsx
@@ -10,6 +10,7 @@ import { useForm } from '@nerdgeschoss/react-use-form-library';
import { useModalInfo } from '../../frontend/components/modal/modal';
import { SelectOption } from '../../frontend/components/form_field/form_field';
import { Text } from '../../frontend/components/text/text';
+import { Form } from '../../frontend/components/form/form';
interface Form {
userId: string;
@@ -58,7 +59,7 @@ export default function ({
const someDaysInPast = fields.days.value.some((date) => date < today);
return (
- <>
+
);
}
diff --git a/app/views/payslips/new.tsx b/app/views/payslips/new.tsx
index 6b9d3ef..97631ce 100644
--- a/app/views/payslips/new.tsx
+++ b/app/views/payslips/new.tsx
@@ -8,6 +8,7 @@ import { SelectField } from '../../frontend/components/select_field/select_field
import { FileField } from '../../frontend/components/file_field/file_field';
import { useReaction } from '../../frontend/sprinkles/reaction';
import { useFormatter } from '../../frontend/util/dependencies';
+import { Form } from '../../frontend/components/form/form';
interface Form {
userId: string;
@@ -42,7 +43,7 @@ export default function ({
},
});
return (
- <>
+
);
}
diff --git a/app/views/sessions/edit.tsx b/app/views/sessions/edit.tsx
index 34bdda0..6c925a4 100644
--- a/app/views/sessions/edit.tsx
+++ b/app/views/sessions/edit.tsx
@@ -7,6 +7,7 @@ import { TextField } from '../../frontend/components/text_field/text_field';
import { Container } from '../../frontend/components/container/container';
import { useForm } from '@nerdgeschoss/react-use-form-library';
import { useReaction } from '../../frontend/sprinkles/reaction';
+import { Form } from '../../frontend/components/form/form';
export default function EditSession({
data: { email },
@@ -30,19 +31,21 @@ export default function EditSession({
});
return (
-
- Login
-
-
-
-
+
);
}
diff --git a/app/views/sessions/new.tsx b/app/views/sessions/new.tsx
index 7e420fd..49f58af 100644
--- a/app/views/sessions/new.tsx
+++ b/app/views/sessions/new.tsx
@@ -6,6 +6,7 @@ import { TextField } from '../../frontend/components/text_field/text_field';
import { Container } from '../../frontend/components/container/container';
import { useForm } from '@nerdgeschoss/react-use-form-library';
import { useReaction } from '../../frontend/sprinkles/reaction';
+import { Form } from '../../frontend/components/form/form';
export default function NewSession(): JSX.Element {
const reaction = useReaction();
@@ -23,11 +24,13 @@ export default function NewSession(): JSX.Element {
});
return (
-
- Login
-
-
-
+
);
}
diff --git a/app/views/sprints/new.tsx b/app/views/sprints/new.tsx
index 910a41f..d61f6dd 100644
--- a/app/views/sprints/new.tsx
+++ b/app/views/sprints/new.tsx
@@ -9,6 +9,7 @@ import { DateField } from '../../frontend/components/date_field/date_field';
import { useReaction } from '../../frontend/sprinkles/reaction';
import { useModalInfo } from '../../frontend/components/modal/modal';
import { NumberField } from '../../frontend/components/number_field/number_field';
+import { Form } from '../../frontend/components/form/form';
export default function ({
data: { sprint },
@@ -42,22 +43,27 @@ export default function ({
});
return (
-
-
-
-
-
-
-
+
);
}