mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
fix: load component on client
This commit is contained in:
@@ -1,8 +1,16 @@
|
||||
import React from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
const calId = 'nih59ktgafmm64ed4qk6ue8vv4@group.calendar.google.com';
|
||||
|
||||
export const Calendar: React.FC = () => {
|
||||
const [isComponentMounted, setIsComponentMounted] = useState(false);
|
||||
|
||||
useEffect(() => setIsComponentMounted(true), []);
|
||||
|
||||
if (!isComponentMounted) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user