Skip to content

Scheduling infrastructure for absolutely everyone.

formatting cleanup

Malte Delfs653509d65526
diff --git a/lib/eventTypeInput.ts b/lib/eventTypeInput.ts
index f3d9f66e2f9..e8c76e428c2 100644
--- a/lib/eventTypeInput.ts
+++ b/lib/eventTypeInput.ts
@@ -1,4 +1,3 @@
-
export enum EventTypeCustomInputType {
Text = 'text',
TextLong = 'textLong',
@@ -12,4 +11,3 @@ export interface EventTypeCustomInput {
label: string;
required: boolean;
}
-
diff --git a/pages/availability/event/[type].tsx b/pages/availability/event/[type].tsx
index 7f40cce3fc2..048afd89d33 100644
--- a/pages/availability/event/[type].tsx
+++ b/pages/availability/event/[type].tsx
@@ -19,12 +19,12 @@ import {PlusIcon} from "@heroicons/react/solid";
export default function EventType(props) {
const router = useRouter();
- const inputOptions: OptionBase[] = [
- { value: EventTypeCustomInputType.Text, label: 'Text' },
- { value: EventTypeCustomInputType.TextLong, label: 'Multiline Text' },
- { value: EventTypeCustomInputType.Number, label: 'Number', },
- { value: EventTypeCustomInputType.Bool, label: 'Checkbox', },
- ]
+ const inputOptions: OptionBase[] = [
+ { value: EventTypeCustomInputType.Text, label: 'Text' },
+ { value: EventTypeCustomInputType.TextLong, label: 'Multiline Text' },
+ { value: EventTypeCustomInputType.Number, label: 'Number', },
+ { value: EventTypeCustomInputType.Bool, label: 'Checkbox', },
+ ]
const [ session, loading ] = useSession();
const [ showLocationModal, setShowLocationModal ] = useState(false);
@@ -32,7 +32,7 @@ export default function EventType(props) {
const [ selectedLocation, setSelectedLocation ] = useState<OptionBase | undefined>(undefined);
const [ selectedInputOption, setSelectedInputOption ] = useState<OptionBase>(inputOptions[0]);
const [ locations, setLocations ] = useState(props.eventType.locations || []);
- const [customInputs, setCustomInputs] = useState<EventTypeCustomInput[]>(props.eventType.customInputs.sort((a, b) => a.id - b.id) || []);
+ const [customInputs, setCustomInputs] = useState<EventTypeCustomInput[]>(props.eventType.customInputs.sort((a, b) => a.id - b.id) || []);
const titleRef = useRef<HTMLInputElement>();
const slugRef = useRef<HTMLInputElement>();
@@ -97,10 +97,10 @@ export default function EventType(props) {
setShowLocationModal(false);
};
- const closeAddCustomModal = () => {
- setSelectedInputOption(inputOptions[0]);
- setShowAddCustomModal(false);
- };
+ const closeAddCustomModal = () => {
+ setSelectedInputOption(inputOptions[0]);
+ setShowAddCustomModal(false);
+ };
const LocationOptions = () => {
if (!selectedLocation) {
@@ -152,22 +152,22 @@ export default function EventType(props) {
setLocations(locations.filter( (location) => location.type !== selectedLocation.type ));
};
- const updateCustom = (e) => {
- e.preventDefault();
+ const updateCustom = (e) => {
+ e.preventDefault();
- const customInput: EventTypeCustomInput = {
- label: e.target.label.value,
- required: e.target.required.checked,
- type: e.target.type.value
- };
+ const customInput: EventTypeCustomInput = {
+ label: e.target.label.value,
+ required: e.target.required.checked,
+ type: e.target.type.value
+ };
- setCustomInputs(customInputs.concat(customInput));
+ setCustomInputs(customInputs.concat(customInput));
- console.log(customInput)
- setShowAddCustomModal(false);
- };
+ console.log(customInput)
+ setShowAddCustomModal(false);
+ };
- return (
+ return (
<div>
<Head>
<title>{props.eventType.title} | Event Type | Calendso</title>