-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2266808
commit 9a172d7
Showing
83 changed files
with
1,597 additions
and
1,891 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,18 @@ | ||
module.exports = { | ||
extends: ["next", "prettier"], | ||
rules: { | ||
"@next/next/no-html-link-for-pages": "off", | ||
"react/jsx-key": "off", | ||
}, | ||
settings: { | ||
next: { | ||
rootDir: true, | ||
}, | ||
}, | ||
overrides: [ | ||
{ | ||
files: ["*.ts", "*.tsx"], | ||
parser: "@typescript-eslint/parser", | ||
}, | ||
], | ||
}; |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
module.exports = { | ||
bracketSpacing: true, | ||
bracketSameLine: true, | ||
singleQuote: false, | ||
jsxSingleQuote: false, | ||
trailingComma: "es5", | ||
semi: true, | ||
printWidth: 110, | ||
arrowParens: "always", | ||
importOrder: [ | ||
// Mocks must be at the top as they contain vi.mock calls | ||
"(.*)/__mocks__/(.*)", | ||
"server-only", | ||
"<THIRD_PARTY_MODULES>", | ||
"^~/(.*)$", | ||
"^[./]", | ||
], | ||
importOrderSeparation: true, | ||
importOrderSortSpecifiers: true, | ||
plugins: ["@trivago/prettier-plugin-sort-imports", "prettier-plugin-tailwindcss"], | ||
}; |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
interface AuthLayoutProps { | ||
children: React.ReactNode | ||
children: React.ReactNode; | ||
} | ||
|
||
export default function AuthLayout({ children }: AuthLayoutProps) { | ||
return <div className="min-h-screen">{children}</div> | ||
return <div className="min-h-screen">{children}</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
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 |
---|---|---|
@@ -1,59 +1,44 @@ | ||
import Link from "next/link" | ||
|
||
import { cn } from "@/lib/utils" | ||
import { buttonVariants } from "@/components/ui/button" | ||
import { Logo } from "@/components/ui/logo" | ||
import { UserAuthForm } from "@/components/user-auth-form" | ||
import { buttonVariants } from "@/components/ui/button"; | ||
import { Logo } from "@/components/ui/logo"; | ||
import { UserAuthForm } from "@/components/user-auth-form"; | ||
import { cn } from "@/lib/utils"; | ||
import Link from "next/link"; | ||
|
||
export const metadata = { | ||
title: "Create an account", | ||
description: "Create an account to get started.", | ||
} | ||
}; | ||
|
||
export default function RegisterPage() { | ||
return ( | ||
<div className="container grid h-screen w-screen flex-col items-center justify-center lg:max-w-none lg:grid-cols-2 lg:px-0"> | ||
<Link | ||
href="/login" | ||
className={cn( | ||
buttonVariants({ variant: "ghost" }), | ||
"absolute right-4 top-4 md:right-8 md:top-8" | ||
)} | ||
> | ||
className={cn(buttonVariants({ variant: "ghost" }), "absolute right-4 top-4 md:right-8 md:top-8")}> | ||
Login | ||
</Link> | ||
<div className="hidden h-full bg-muted lg:block" /> | ||
<div className="lg:p-8"> | ||
<div className="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]"> | ||
<div className="flex flex-col space-y-2 text-center"> | ||
<Logo /> | ||
<h1 className="text-2xl font-semibold tracking-tight"> | ||
Create an account | ||
</h1> | ||
<p className="text-sm text-muted-foreground"> | ||
Use Github to create your account | ||
</p> | ||
<h1 className="text-2xl font-semibold tracking-tight">Create an account</h1> | ||
<p className="text-sm text-muted-foreground">Use Github to create your account</p> | ||
</div> | ||
<UserAuthForm /> | ||
<p className="px-8 text-center text-sm text-muted-foreground"> | ||
By clicking continue, you agree to our{" "} | ||
<Link | ||
href="/terms" | ||
className="hover:text-brand underline underline-offset-4" | ||
> | ||
<Link href="/terms" className="hover:text-brand underline underline-offset-4"> | ||
Terms of Service | ||
</Link>{" "} | ||
and{" "} | ||
<Link | ||
href="/privacy" | ||
className="hover:text-brand underline underline-offset-4" | ||
> | ||
<Link href="/privacy" className="hover:text-brand underline underline-offset-4"> | ||
Privacy Policy | ||
</Link> | ||
. | ||
</p> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
"use client" | ||
"use client"; | ||
|
||
import { Button } from "@/components/ui/button" | ||
import { Button } from "@/components/ui/button"; | ||
|
||
export default function ConnectGitHubAppButton() { | ||
const handleRedirect = () => { | ||
window.location.href = | ||
"https://github.com/apps/ossgg-test/installations/new" | ||
} | ||
window.location.href = "https://github.com/apps/ossgg-test/installations/new"; | ||
}; | ||
|
||
return ( | ||
<Button onClick={handleRedirect} className="w-full"> | ||
Connect Repo | ||
</Button> | ||
) | ||
); | ||
} |
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 |
---|---|---|
@@ -1,13 +1,10 @@ | ||
import { DashboardHeader } from "@/components/header" | ||
import { DashboardShell } from "@/components/shell" | ||
import { DashboardHeader } from "@/components/header"; | ||
import { DashboardShell } from "@/components/shell"; | ||
|
||
export default function DashboardSettingsLoading() { | ||
return ( | ||
<DashboardShell> | ||
<DashboardHeader | ||
heading="Contribute to oss.gg" | ||
text="Help us make this more fun and engaging." | ||
/> | ||
<DashboardHeader heading="Contribute to oss.gg" text="Help us make this more fun and engaging." /> | ||
</DashboardShell> | ||
) | ||
); | ||
} |
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 |
---|---|---|
@@ -1,28 +1,24 @@ | ||
import { redirect } from "next/navigation" | ||
|
||
import { authOptions } from "@/lib/auth" | ||
import { getCurrentUser } from "@/lib/session" | ||
import { DashboardHeader } from "@/components/header" | ||
import { DashboardShell } from "@/components/shell" | ||
import { DashboardHeader } from "@/components/header"; | ||
import { DashboardShell } from "@/components/shell"; | ||
import { authOptions } from "@/lib/auth"; | ||
import { getCurrentUser } from "@/lib/session"; | ||
import { redirect } from "next/navigation"; | ||
|
||
export const metadata = { | ||
title: "Contribute to oss.gg", | ||
description: "Help us make this more fun and engaging.", | ||
} | ||
}; | ||
|
||
export default async function SettingsPage() { | ||
const user = await getCurrentUser() | ||
const user = await getCurrentUser(); | ||
|
||
if (!user) { | ||
redirect(authOptions?.pages?.signIn || "/login") | ||
redirect(authOptions?.pages?.signIn || "/login"); | ||
} | ||
return ( | ||
<DashboardShell> | ||
<DashboardHeader | ||
heading="Contribute to oss.gg" | ||
text="Help us make this more fun and engaging." | ||
/> | ||
<DashboardHeader heading="Contribute to oss.gg" text="Help us make this more fun and engaging." /> | ||
<div className="grid gap-10"></div> | ||
</DashboardShell> | ||
) | ||
); | ||
} |
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
Oops, something went wrong.