mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-01-31 00:53:37 +00:00
Fixed Infinate Redirect When trying to Login or Signup
This commit is contained in:
parent
525e9311e0
commit
fd40614b93
5 changed files with 6 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
import { SignIn } from '@clerk/nextjs';
|
import { SignIn } from '@clerk/nextjs';
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return <SignIn afterSignInUrl='/select-org' />;
|
return <SignIn signUpUrl='/sign-up' afterSignInUrl='/select-org' />;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { SignUp } from '@clerk/nextjs';
|
import { SignUp } from '@clerk/nextjs';
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return <SignUp afterSignUpUrl='/select-org' />;
|
return <SignUp signInUrl='/sign-in' afterSignUpUrl='/select-org' />;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
|
import { auth } from '@clerk/nextjs/server';
|
||||||
|
|
||||||
import { Navbar } from './_components/Navbar';
|
import { Navbar } from './_components/Navbar';
|
||||||
|
|
||||||
const DashbordLayout = ({ children }: { children: React.ReactNode }) => {
|
const DashbordLayout = ({ children }: { children: React.ReactNode }) => {
|
||||||
|
auth().protect();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='h-full'>
|
<div className='h-full'>
|
||||||
<Navbar />
|
<Navbar />
|
||||||
|
|
|
@ -25,7 +25,6 @@ export const BoardList = async () => {
|
||||||
orderBy: {
|
orderBy: {
|
||||||
createdAt: 'desc',
|
createdAt: 'desc',
|
||||||
},
|
},
|
||||||
cacheStrategy: { ttl: 30, swr: 60 },
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const availableCount = await getAvailableCount();
|
const availableCount = await getAvailableCount();
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
import { Toaster } from 'sonner';
|
import { Toaster } from 'sonner';
|
||||||
import { auth } from '@clerk/nextjs/server';
|
|
||||||
import { ClerkProvider } from '@clerk/nextjs';
|
import { ClerkProvider } from '@clerk/nextjs';
|
||||||
|
|
||||||
import { ModalProvider } from '@/components/providers/modal-provider';
|
import { ModalProvider } from '@/components/providers/modal-provider';
|
||||||
import { QueryProvider } from '@/components/providers/query-provider';
|
import { QueryProvider } from '@/components/providers/query-provider';
|
||||||
|
|
||||||
const PlatformLayout = ({ children }: { children: React.ReactNode }) => {
|
const PlatformLayout = ({ children }: { children: React.ReactNode }) => {
|
||||||
auth().protect();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ClerkProvider>
|
<ClerkProvider>
|
||||||
<QueryProvider>
|
<QueryProvider>
|
||||||
|
|
Loading…
Reference in a new issue