diff --git a/src/components/container/Popup.tsx b/src/components/container/Popup.tsx
index 0d096d9e..53e02a83 100644
--- a/src/components/container/Popup.tsx
+++ b/src/components/container/Popup.tsx
@@ -8,14 +8,12 @@ const Popup = (props: PopupProps) => {
return (
-
- {props.children}
-
+ {props.children}
);
diff --git a/src/components/user/AddFile.tsx b/src/components/user/AddFile.tsx
index 0611ca88..52894f57 100644
--- a/src/components/user/AddFile.tsx
+++ b/src/components/user/AddFile.tsx
@@ -129,91 +129,79 @@ const AddFile = ({
}
};
- return (
- <>
- {showAddFilePopUp && (
-
- {!error ? (
-
-
- {" "}
- Create New File
-
-
- Select Date
-
-
-
-
- }
- wrapperClassName="w-full relative"
- calendarIconClassname="text-3xl text-blue-600 mt-[7px] absolute right-2"
- className="mb-4 h-16 w-full cursor-pointer rounded-lg pl-4"
- selected={startDate}
- onChange={(date) => date && setStartDate(date)}
- dateFormat="dd MMMM yyyy"
- excludeDates={excludeDates}
- />
- {excludedDatesString.includes(startDate.toDateString()) ? (
-
- ***ERROR: Please pick a date that you have not created a
- file for***
-
- ) : null}
-
-
-
-
-
-
-
-
- ) : (
- <>
- {error && (
-
-
- There was an error adding your file. Please reach out to
- your club administrator for assistance.
-
-
-
-
-
- )}
- >
- )}
-
- )}
- >
+ if (!showAddFilePopUp) {
+ return null;
+ }
+
+ return !error ? (
+
+
+
Create New File
+
+ Select Date
+
+
+
+
+ }
+ wrapperClassName="w-full relative"
+ calendarIconClassname="text-3xl text-blue-600 mt-[7px] absolute right-2"
+ className="mb-4 h-16 w-full cursor-pointer rounded-lg pl-4"
+ selected={startDate}
+ onChange={(date) => date && setStartDate(date)}
+ dateFormat="dd MMMM yyyy"
+ excludeDates={excludeDates}
+ />
+ {excludedDatesString.includes(startDate.toDateString()) ? (
+
+ ***ERROR: Please pick a date that you have not created a file
+ for***
+
+ ) : null}
+
+
+
+
+
+
+
+
+
+ ) : (
+
+
+
+ There was an error adding your file. Please reach out to your club
+ administrator for assistance.
+
+
+
+
);
};