-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Authentication and sync the user profile with database
- Loading branch information
Showing
79 changed files
with
2,425 additions
and
1,146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# next | ||
.next/ | ||
|
||
# Ignore special files | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"semi": true, | ||
"singleQuote": false, | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"trailingComma": "es5", | ||
"bracketSpacing": true | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from "react"; | ||
import CTAHiring from "../../../../../components/Hiring/CTAHiring"; | ||
import InfiniteScrollingLogos from "../../../../../components/Hiring/InfiniteScrollingLogos"; | ||
import JobBoard from "../../../../../components/Hiring/JobBoard"; | ||
import CTAHiring2 from "../../../../../components/Hiring/CTAHiring2"; | ||
import FeatureSection from "../../../../../components/Hiring/Feature"; | ||
import Testimonial from "../../../../../components/Hiring/Testimonial"; | ||
|
||
export default function HiringPage() { | ||
return ( | ||
<> | ||
<div className="py-14 "> | ||
<CTAHiring /> | ||
<InfiniteScrollingLogos /> | ||
<JobBoard /> | ||
<Testimonial /> | ||
<FeatureSection /> | ||
<CTAHiring2 /> | ||
</div> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from "react"; | ||
|
||
import Navbar from "../../../../components/Navbar"; | ||
import Footer from "../../../../components/Footer/Footer"; | ||
import { authProfile } from "@/libs/auth.user"; | ||
import { redirectToSignIn } from "@clerk/nextjs"; | ||
export default async function DefaultLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
const profile = await authProfile(); | ||
if (!profile) { | ||
return redirectToSignIn(); | ||
} | ||
return ( | ||
<div> | ||
<Navbar profile={profile} /> | ||
{children} | ||
<Footer /> | ||
</div> | ||
); | ||
} |
13 changes: 8 additions & 5 deletions
13
...(routes)/(default)/shots/popular/page.tsx → ...(routes)/(default)/shots/popular/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from "react"; | ||
import { redirect } from "next/navigation"; | ||
|
||
import Navbar from "@/components/Navbar"; | ||
import { getAuthUser } from "@/libs/auth.user"; | ||
|
||
export default async function MainLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
const profile = await getAuthUser(); | ||
if (!profile) { | ||
redirect("/signin"); | ||
} | ||
return ( | ||
<div className="w-full "> | ||
<Navbar profile={profile} /> | ||
<div className="xl:px-16">{children}</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/app/(main)/(routes)/uploads/new/page.tsx → app/(main)/(routes)/uploads/new/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.