diff --git a/src/components/custom-ui/labeled-input.tsx b/src/components/custom-ui/labeled-input.tsx
index 38a6c56..4900e66 100644
--- a/src/components/custom-ui/labeled-input.tsx
+++ b/src/components/custom-ui/labeled-input.tsx
@@ -17,7 +17,6 @@ export default function LabeledInput({
variantSize = 'default',
autocomplete,
error,
- 'data-cy': dataCy,
...rest
}: {
label: string;
@@ -31,7 +30,6 @@ export default function LabeledInput({
variantSize?: 'default' | 'big' | 'textarea';
autocomplete?: string;
error?: string;
- 'data-cy'?: string;
} & React.InputHTMLAttributes
) {
const [passwordVisible, setPasswordVisible] = React.useState(false);
const [inputValue, setInputValue] = React.useState(
@@ -66,7 +64,6 @@ export default function LabeledInput({
id={name}
name={name}
rows={3}
- data-cy={dataCy}
/>
) : (
@@ -85,7 +82,6 @@ export default function LabeledInput({
id={name}
name={name}
autoComplete={autocomplete}
- data-cy={dataCy}
{...rest}
onChange={handleInputChange}
/>
diff --git a/src/components/forms/event-form.tsx b/src/components/forms/event-form.tsx
index 822cf4d..d89efdc 100644
--- a/src/components/forms/event-form.tsx
+++ b/src/components/forms/event-form.tsx
@@ -190,6 +190,11 @@ const EventForm: React.FC = (props) => {
router.back();
}
+ // Calculate values for organiser, created, and updated
+ const organiserValue = isLoading
+ ? 'Loading...'
+ : data?.data.user?.name || 'Unknown User';
+
// Use DB values for created_at/updated_at in edit mode
const createdAtValue =
props.type === 'edit' && eventData?.data?.event?.created_at
@@ -204,203 +209,188 @@ const EventForm: React.FC = (props) => {
const createdAtDisplay = new Date(createdAtValue).toLocaleDateString();
const updatedAtDisplay = new Date(updatedAtValue).toLocaleDateString();
- const [isClient, setIsClient] = React.useState(false);
- React.useEffect(() => {
- setIsClient(true);
- }, []);
-
if (props.type === 'edit' && isLoading) return Loading...
;
if (props.type === 'edit' && fetchError)
return Error loading event.
;
return (
-