Improve parity

Portal modals to body. Pad timezone buttons. Add initial attachment
support. Default username/avatar
This commit is contained in:
2023-11-19 15:54:37 +00:00
parent 76c8afd45f
commit c8443340f4
7 changed files with 58 additions and 19 deletions

View File

@ -1,14 +1,14 @@
import { createContext } from "preact";
import { useContext } from "preact/compat";
import { useState } from "preact/hooks";
import { SystemZone } from "luxon";
import { DateTime } from "luxon";
type TTimezoneContext = [string, (tz: string) => void];
const TimezoneContext = createContext(["UTC", () => {}] as TTimezoneContext);
export const TimezoneProvider = ({ children }) => {
const [timezone, setTimezone] = useState(SystemZone.name);
const [timezone, setTimezone] = useState(DateTime.now().zoneName);
return (
<TimezoneContext.Provider value={[timezone, setTimezone]}>