mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-05-01 03:09:34 +00:00
Upgrade Clerk, Next.js, and React to latest versions + minor code changes
This commit is contained in:
parent
a63270db0c
commit
a89c9a9b02
31 changed files with 140 additions and 130 deletions
|
@ -8,7 +8,7 @@ export async function generateMetadata(props: {
|
|||
params: Promise<{ boardId: string }>;
|
||||
}) {
|
||||
const params = await props.params;
|
||||
const { orgId } = auth();
|
||||
const { orgId } = await auth();
|
||||
|
||||
if (!orgId) return { title: 'Board' };
|
||||
|
||||
|
@ -32,7 +32,7 @@ const BoardIdLayout = async (props: {
|
|||
|
||||
const { children } = props;
|
||||
|
||||
const { orgId } = auth();
|
||||
const { orgId } = await auth();
|
||||
|
||||
if (!orgId) redirect('/select-org');
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ interface BoardIdPageProps {
|
|||
|
||||
const BoardIdPage = async (props: BoardIdPageProps) => {
|
||||
const params = await props.params;
|
||||
const { orgId } = auth();
|
||||
const { orgId } = await auth();
|
||||
|
||||
if (!orgId) {
|
||||
redirect('/select-org');
|
||||
|
|
|
@ -2,8 +2,8 @@ import { auth } from '@clerk/nextjs/server';
|
|||
|
||||
import { Navbar } from './_components/Navbar';
|
||||
|
||||
const DashbordLayout = ({ children }: { children: React.ReactNode }) => {
|
||||
auth().protect();
|
||||
const DashbordLayout = async ({ children }: { children: React.ReactNode }) => {
|
||||
await auth.protect();
|
||||
|
||||
return (
|
||||
<div className='h-full'>
|
||||
|
|
|
@ -12,7 +12,7 @@ import { getAvailableCount } from '@/lib/org-limit';
|
|||
import { checkSubscription } from '@/lib/subscription';
|
||||
|
||||
export const BoardList = async () => {
|
||||
const { orgId } = auth();
|
||||
const { orgId } = await auth();
|
||||
|
||||
if (!orgId) {
|
||||
return redirect('/select-org');
|
||||
|
|
|
@ -6,7 +6,7 @@ import { ActivityItem } from '@/components/activity-item';
|
|||
import { Skeleton } from '@/components/ui/skeleton';
|
||||
|
||||
export const ActivityList = async () => {
|
||||
const { orgId } = auth();
|
||||
const { orgId } = await auth();
|
||||
|
||||
if (!orgId) redirect('/select-org');
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import { auth } from '@clerk/nextjs/server';
|
|||
import { OrgControl } from './_components/org-control';
|
||||
|
||||
export async function generateMetadata() {
|
||||
const { orgSlug } = auth();
|
||||
const { orgSlug } = await auth();
|
||||
|
||||
return {
|
||||
title: startCase(orgSlug ?? 'organization'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue