Add fix for create event type modal (#878)

Co-authored-by: Alex Johansson <alexander@n1s.se>
pull/752/head^2
Bailey Pumfleet 2021-10-07 23:49:53 +01:00 committed by GitHub
parent 32567c8e80
commit 33a683d4b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 3 deletions

View File

@ -15,7 +15,7 @@ dayjs.extend(utc);
export default function Troubleshoot({ user }: inferSSRProps<typeof getServerSideProps>) {
const [loading, setLoading] = useState(true);
const [availability, setAvailability] = useState([]);
const [selectedDate] = useState(dayjs());
const [selectedDate, setSelectedDate] = useState(dayjs());
function convertMinsToHrsMins(mins: number) {
let h = Math.floor(mins / 60);
@ -55,9 +55,17 @@ export default function Troubleshoot({ user }: inferSSRProps<typeof getServerSid
<Shell
heading="Troubleshoot"
subtitle="Understand why certain times are available and others are blocked.">
<div className="bg-white max-w-md overflow-hidden shadow rounded-sm">
<div className="bg-white max-w-xl overflow-hidden shadow rounded-sm">
<div className="px-4 py-5 sm:p-6">
Here is an overview of your day on {selectedDate.format("D MMMM YYYY")}:
Here is an overview of your day on{" "}
<input
type="date"
className="inline border-none h-8 p-0"
defaultValue={selectedDate.format("YYYY-MM-DD")}
onBlur={(e) => {
setSelectedDate(dayjs(e.target.value));
}}
/>
<small className="block text-neutral-400">
Tip: Hover over the bold times for a full timestamp
</small>