mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-24 07:25:10 +00:00
export modal
This commit is contained in:
parent
09182add06
commit
0c3fb8ff2f
1 changed files with 11 additions and 8 deletions
|
@ -99,13 +99,8 @@ function LocalTimestampInner(props: LocalTimestampProps): JSX.Element | null {
|
|||
className={classes}
|
||||
onClick={() => {
|
||||
toolTipProps.onClick();
|
||||
openModal(modalProps =>
|
||||
<TimezoneOverrideModal
|
||||
userId={props.userId}
|
||||
modalProps={modalProps} />,
|
||||
);
|
||||
}}
|
||||
>
|
||||
openTimezoneOverwriteModal(props.userId);
|
||||
}}>
|
||||
{shortTimeFormatted}
|
||||
</span>
|
||||
</>}
|
||||
|
@ -118,7 +113,7 @@ interface TimezoneOverrideModalProps {
|
|||
modalProps: ModalProps,
|
||||
}
|
||||
|
||||
export function TimezoneOverrideModal(props: TimezoneOverrideModalProps) {
|
||||
function TimezoneOverrideModal(props: TimezoneOverrideModalProps) {
|
||||
const [availableTimezones, setAvailableTimezones] = useState<SelectOption[]>();
|
||||
const [timezone, setTimezone] = useState<string | "NONE" | undefined>();
|
||||
|
||||
|
@ -212,3 +207,11 @@ export function TimezoneOverrideModal(props: TimezoneOverrideModalProps) {
|
|||
</ModalFooter>
|
||||
</ModalRoot>;
|
||||
}
|
||||
|
||||
export function openTimezoneOverwriteModal(userId: string) {
|
||||
openModal(modalProps => <>
|
||||
<ErrorBoundary>
|
||||
<TimezoneOverrideModal userId={userId} modalProps={modalProps} />
|
||||
</ErrorBoundary>
|
||||
</>);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue