mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-17 01:51:48 +02:00
Remove render block (#465)
* Remove render block * Remove unused import
This commit is contained in:
parent
d397654de7
commit
586c33095f
1 changed files with 1 additions and 10 deletions
|
@ -10,7 +10,7 @@ import timezone from "dayjs/plugin/timezone";
|
|||
import utc from "dayjs/plugin/utc";
|
||||
import { useTranslation } from "next-i18next";
|
||||
import * as React from "react";
|
||||
import { useAsync, useLocalStorage, useMount } from "react-use";
|
||||
import { useAsync, useLocalStorage } from "react-use";
|
||||
|
||||
import { useRequiredContext } from "../components/use-required-context";
|
||||
|
||||
|
@ -210,14 +210,5 @@ const DayjsProviderInner: React.VoidFunctionComponent<{
|
|||
export const DayjsProvider: React.VoidFunctionComponent<{
|
||||
children?: React.ReactNode;
|
||||
}> = ({ children }) => {
|
||||
const [isMounted, setIsMounted] = React.useState(false);
|
||||
useMount(() => {
|
||||
setIsMounted(true);
|
||||
});
|
||||
|
||||
if (!isMounted) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <DayjsProviderInner>{children}</DayjsProviderInner>;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue