Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
feat: nest all admin stuff under /dashboard now that we are not using…
Browse files Browse the repository at this point in the history
… subdomain
  • Loading branch information
tonyxiao committed Apr 30, 2024
1 parent 4da09e7 commit a7454fd
Show file tree
Hide file tree
Showing 26 changed files with 8 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Link from 'next/link'

import {cn} from '@/lib-client/ui-utils'

const links: Array<{href: string; title: string}> = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

import {OrganizationSwitcher, useAuth, UserButton} from '@clerk/nextjs'
import NextTopLoader from 'nextjs-toploader'

import {NoSSR} from '@/components/NoSSR'
import {RedirectToNext13} from '@/components/RedirectTo'
import {VCommandBar} from '@/vcommands/vcommand-components'

import {Sidebar} from './Sidebar'

export default function AuthedLayout({children}: {children: React.ReactNode}) {
Expand All @@ -17,7 +15,7 @@ export default function AuthedLayout({children}: {children: React.ReactNode}) {
// const orgs = useOrganizationList()

if (auth.isLoaded && !auth.isSignedIn) {
return <RedirectToNext13 url="/sign-in" />
return <RedirectToNext13 url="/dashboard/sign-in" />
}

// useEffect(() => {
Expand All @@ -40,7 +38,7 @@ export default function AuthedLayout({children}: {children: React.ReactNode}) {
// }
// // if (!auth.isSignedIn) {
// // console.log('[AuthedLayout] redirect to sign in ')
// // return <RedirectToNext13 url="/sign-in" />
// // return <RedirectToNext13 url="/dashboard/sign-in" />
// // }
// if (!orgs.isLoaded) {
// // console.log('[AuthedLayout] orgs not loaded', auth, orgs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// import {createServerComponentHelpers} from '@/server/server-component-helpers'

import ResourcePage from './ResourcesPage'

export default ResourcePage

// export default async function ResourcesPageContainer() {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function OrgLayoutClient({
}

if (auth.isLoaded && !auth.isSignedIn) {
return <RedirectToNext13 url="/sign-in" />
return <RedirectToNext13 url="/dashboard/sign-in" />
}

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import {
clerkClient,
auth as serverComponentGetAuth,
} from '@clerk/nextjs'
import {clerkClient, auth as serverComponentGetAuth} from '@clerk/nextjs'
import {notFound} from 'next/navigation'

import OrgLayoutClient from './layout-client'

export default async function OrgLayout({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
'use client'

import {SignIn} from '@clerk/nextjs'

import {FullScreenCenter} from '@/components/FullScreenCenter'

export default function SignInScreen() {
return (
<FullScreenCenter>
<SignIn signUpUrl="/sign-up" />
<SignIn signUpUrl="/dashboard/sign-up" />
</FullScreenCenter>
)
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
'use client'

import {SignUp} from '@clerk/nextjs'

import {FullScreenCenter} from '@/components/FullScreenCenter'

export default function SignInScreen() {
return (
<FullScreenCenter>
<SignUp signInUrl="/sign-in" />
<SignUp signInUrl="/dashboard/sign-in" />
</FullScreenCenter>
)
}
2 changes: 1 addition & 1 deletion apps/web/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {env} from '@openint/app-config/env'
export const metadata = {
title: `${
env.VERCEL_ENV === 'production' ? '' : `[${env.VERCEL_ENV}] `
}Venice — Financial data, fast.`,
}OpenInt`,
icons: [{url: '/favicon.svg', type: 'image/svg+xml'}],
}

Expand Down

0 comments on commit a7454fd

Please sign in to comment.