Improve parity
Portal modals to body. Pad timezone buttons. Add initial attachment support. Default username/avatar
This commit is contained in:
@ -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]}>
|
||||
|
Reference in New Issue
Block a user