Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fevziatanoglu committed Nov 16, 2024
1 parent 34c4337 commit b7176fb
Show file tree
Hide file tree
Showing 24 changed files with 940 additions and 140 deletions.
27 changes: 27 additions & 0 deletions app/(auth)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { ClerkProvider, RedirectToSignUp } from "@clerk/nextjs";
import { Inter } from "next/font/google";
import "../globals.css";

const inter = Inter({
subsets: ["latin"],
});

export const metadata = {
title: "Nextjs Social",
description: "Generated by Next.js",
};

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<ClerkProvider>

<body className={inter.className}>{children}</body>
</ClerkProvider>
</html>
);
}
32 changes: 32 additions & 0 deletions app/(auth)/onboarding/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import AccountProfile from "@/components/forms/AccountProfile";
import { currentUser } from "@clerk/nextjs/server";
import { useEffect } from "react";


export default async function Onboarding(){
const user = await currentUser();

const userInfo = {

}

// come from database
const userData = {
id: user?.id,
objectId : user?._id,
username : user?.username,
name : user?.firstName || "",
bio : "",
image : user?.imageUrl
}


return (
<main>
<h1>Onboarding</h1>
<section>
<AccountProfile user={userData} btnTitle={"Continue"}></AccountProfile>
</section>
</main>
)
}
7 changes: 7 additions & 0 deletions app/(auth)/sign-in/[[...sign-in]]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { SignIn } from '@clerk/nextjs'

export default function Page() {
return <div className='w-screen h-screen flex justify-center items-center'>
<SignIn fallbackRedirectUrl="/onboarding"/>
</div>
}
10 changes: 10 additions & 0 deletions app/(auth)/sign-up/[[...sign-up]]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { RedirectToSignIn, SignUp } from "@clerk/nextjs";

export default function Page() {
return (
<div className="w-screen h-screen flex justify-center items-center">
<SignUp fallbackRedirectUrl="/onboarding">
</SignUp>
</div>
);
}
33 changes: 33 additions & 0 deletions app/(root)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import type { Metadata } from "next";
import "../globals.css";
import { ClerkProvider } from "@clerk/nextjs";
import TopBar from "@/components/shared/TopBar";
import RightBar from "@/components/shared/RightBar";
import LeftBar from "@/components/shared/LeftBar";

export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
};

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<ClerkProvider>
<body>
<TopBar></TopBar>
<main className="flex flex-row w-screen h-screen">
<LeftBar></LeftBar>
<section className="flex-[3] bg-blue-500">{children}</section>
<RightBar></RightBar>

</main>
</body>
</ClerkProvider>
</html>
);
}
8 changes: 8 additions & 0 deletions app/(root)/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

export default function Home() {
return (
<div className="bg-blue-500">
home page!!!
</div>
);
}
Binary file removed app/fonts/GeistMonoVF.woff
Binary file not shown.
Binary file removed app/fonts/GeistVF.woff
Binary file not shown.
35 changes: 0 additions & 35 deletions app/layout.tsx

This file was deleted.

101 changes: 0 additions & 101 deletions app/page.tsx

This file was deleted.

Loading

0 comments on commit b7176fb

Please sign in to comment.