diff --git a/apps/deploy-fe/src/app/(web3-authenticated)/(dashboard)/home/loading.tsx b/apps/deploy-fe/src/app/(web3-authenticated)/(dashboard)/home/loading.tsx new file mode 100644 index 0000000..0e7311c --- /dev/null +++ b/apps/deploy-fe/src/app/(web3-authenticated)/(dashboard)/home/loading.tsx @@ -0,0 +1,6 @@ +'use client' +import { LoadingOverlay } from '@/components/foundation/loading/loading-overlay' + +export default function Loading() { + return +} diff --git a/apps/deploy-fe/src/app/(web3-authenticated)/(dashboard)/home/page.tsx b/apps/deploy-fe/src/app/(web3-authenticated)/(dashboard)/home/page.tsx index 69c5058..d14ecb7 100644 --- a/apps/deploy-fe/src/app/(web3-authenticated)/(dashboard)/home/page.tsx +++ b/apps/deploy-fe/src/app/(web3-authenticated)/(dashboard)/home/page.tsx @@ -1,28 +1,33 @@ -import PageWrapper from '@/components/foundation/page-wrapper' -import { Button } from '@workspace/ui/components/button' -import { Github, Shapes } from 'lucide-react' +import { auth, clerkClient } from '@clerk/nextjs/server' +import { Octokit } from '@octokit/rest' +import { notFound } from 'next/navigation' + +export default async function Page() { + const clerk = await clerkClient() + const authenticated = await auth() + const userId = authenticated.userId + + if (!userId) { + return notFound() + } + + // try { + const { data } = await clerk.users.getUserOauthAccessToken(userId, 'github') + console.log(data[0]?.token) + // if (data[0]?.token.length > 0) { + const octokit = new Octokit({ + auth: data[0]?.token + }) + const isAuthenticated = await octokit.orgs.listForAuthenticatedUser() + console.log(isAuthenticated) + // const userrr = await octokit.rest.repos.get() + // console.log(userrr) + // } + // } catch (error) {} -export default function OnboardingFlow() { return ( - - - - - - - Deploy your first app - - - Once connected, you can import a repository from your account or - start with one of our templates. - - - - - - Connect to GitHub - - - +
- Once connected, you can import a repository from your account or - start with one of our templates. -