Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InterSectionServer #184

Open
re1fly opened this issue Dec 15, 2023 · 1 comment
Open

InterSectionServer #184

re1fly opened this issue Dec 15, 2023 · 1 comment

Comments

@re1fly
Copy link

re1fly commented Dec 15, 2023

image

hello guys, how to fix this?

@SOG-web
Copy link

SOG-web commented May 3, 2024

it a little bit tricky but i hope this helps

'use client'

import React, {useEffect} from 'react';
import { useRouter } from 'next/navigation'
import {useAuth} from "@/context/AuthProvider";

import dynamic from 'next/dynamic'
const AdminChat = dynamic(() => import('@/Components/AdminChat'), { ssr: false })

const Page = () => {
    const {user} = useAuth()
    const router = useRouter()

    useEffect(() => {
        if(!user) {
            router.replace('/auth')
        }
    }, [])


    return (
        <AdminChat />
    );
};

export default Page;
import React from 'react';
import { ChatEngine } from 'react-chat-engine';

const AdminChat = () => {
    return (
        <ChatEngine
            // @ts-ignore
            height="calc(100vh - 64px)"
            projectID="821e329e-26e6-4e6f-b7ea-c9cd98dc8253"
            userName="Admin"
            userSecret="admin"
        />
    );
};

export default AdminChat;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants