You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi you might want to check your code in /app/(root)/create-thread/page.tsx.
It should be:
import PostThread from '@/components/forms/PostThread';
import { fetchUser } from '@/lib/actions/user.actions';
import { currentUser } from '@clerk/nextjs';
import { redirect } from 'next/navigation';
async function Page() {
const user = await currentUser();
if(!user) return null;
// fetch organization list created by user
const userInfo = await fetchUser(user.id);
if (!userInfo?.onboarded) redirect("/onboarding"); // move all the users that maybe switch their url bar manually, it will bring them back to onboarding
return (
<>
<h1 className='head-text'>Create Thread</h1>
<PostThread userId={userInfo._id} />
</>
);
}
export default Page;
Whenever i click on Post thread button, it throws error of invalid url in the UI.
The text was updated successfully, but these errors were encountered: