From 721b874bedc740feaf68005593aa89bbe0e90c83 Mon Sep 17 00:00:00 2001 From: Bailey Pumfleet Date: Wed, 4 Aug 2021 17:06:05 +0100 Subject: [PATCH] Re-add auto slug population --- pages/event-types/index.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pages/event-types/index.tsx b/pages/event-types/index.tsx index ad3e0856fb..8b73886c85 100644 --- a/pages/event-types/index.tsx +++ b/pages/event-types/index.tsx @@ -56,6 +56,12 @@ export default function Availability({ user, types }) { } } + function autoPopulateSlug() { + let t = titleRef.current.value; + t = t.replace(/\s+/g, "-").toLowerCase(); + slugRef.current.value = t; + } + if (loading) { return ; } @@ -83,6 +89,7 @@ export default function Availability({ user, types }) {