Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "feat: User Info Page with dummy data" #201

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,470 changes: 86 additions & 2,384 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"dependencies": {
"@actions/github": "^5.1.1",
"@gitbeaker/rest": "^39.10.2",
"@radix-ui/themes": "^1.0.0",
"chalk": "^4.1.2",
"dotenv": "^16.3.1",
"inquirer": "^9.2.8",
Expand Down
40 changes: 16 additions & 24 deletions services/web-app/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,28 @@
import "../styles/globals.css";
import "../styles/custom.css";
import React, { ReactNode } from "react";
import { NextAuthProvider } from "./providers";
import { Footer } from "@/components/footer/footer";
import { Header } from "@/components/header/header";
import "@radix-ui/themes/styles.css";
import { Theme } from "@radix-ui/themes";
import React, { ReactNode } from 'react';
import { NextAuthProvider } from './providers';
import { Footer } from '@/components/footer/footer';
import { Header } from '@/components/header/header';

export const metadata = {
title: "Code Review GPT",
};
title: 'Code Review GPT',
}

export default function RootLayout({ children }: { children: ReactNode }) {
export default function RootLayout({
children,
}: {children: ReactNode }) {
return (
<html lang="en">
<head>
<script
type="module"
src="https://md-block.verou.me/md-block.js"
></script>
</head>
<body className="flex flex-col min-h-screen">
<Theme>
<head>
<script type="module" src="https://md-block.verou.me/md-block.js"></script>
</head>
<body>
<NextAuthProvider>
<Header />
<main className="flex flex-col flex-grow mb-16">
{children}
</main>
{children}
<Footer />
</NextAuthProvider>
</Theme>
</body>
</body>
</html>
);
)
}
3 changes: 2 additions & 1 deletion services/web-app/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { useSession } from 'next-auth/react';
import { InstallationInstructions } from './constants';
import ReactMarkdown from 'react-markdown';

export default function Home() {
return (
<>
<div className="flex flex-col p-5 ml-10 mr-10">
<div className="flex flex-col p-5 ">
<ReactMarkdown className="markdown" children={InstallationInstructions} />
</div>
</>
Expand Down
59 changes: 0 additions & 59 deletions services/web-app/src/app/profile/page.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions services/web-app/src/components/buttons/headerBtn.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions services/web-app/src/components/buttons/signIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { signIn } from 'next-auth/react';

export const SignInButton = () => {
return (
<button className="border-2 p-[5px] mr-3 ml-3 text-xl hover:underline" onClick={() => { signIn("github") }}>
<button className="border-2 p-[5px] text-xl hover:underline" onClick={() => { signIn("github") }}>
Sign In
</button>
)
};
};
2 changes: 1 addition & 1 deletion services/web-app/src/components/buttons/signOut.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { signOut } from 'next-auth/react';

export const SignOutButton = () => {
return (
<button className="border-2 border-black p-[5px] mr-3 ml-3 text-xl hover:underline" onClick={() => { signOut() }}>
<button className="border-2 border-black p-[5px] text-xl hover:underline" onClick={() => { signOut() }}>
Sign Out
</button>
)
Expand Down
11 changes: 5 additions & 6 deletions services/web-app/src/components/footer/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@ import Image from "next/image";

export const Footer = (): JSX.Element => {
return (
<footer className="flex flex-col items-center text-l text-white fixed bottom-0 left-0 w-full bg-black py-1">
<footer className="flex flex-col items-center text-xl">
Join the community
<div className="flex flex-row justify-evenly py-2 space-x-4">
<div className="flex flex-row justify-evenly py-[10px] space-x-4">
<a href="https://github.com/mattzcarey/code-review-gpt">
<Image src="/githubLogo.svg" alt={"github logo"} width={20} height={20} />
<Image src="/githubLogo.svg" alt={"github logo"} width={40} height={40} />
</a>
<a href="https://twitter.com/intent/follow?screen_name=oriontools.ai">
<Image src="/twitterLogo.svg" alt={"twitter logo"} width={20} height={20} />
<Image src="/twitterLogo.svg" alt={"twitter logo"} width={40} height={40} />
</a>
<a href="https://join.slack.com/t/orion-tools/shared_invite/zt-20x79nfgm-UGIHK1uWGQ59JQTpODYDwg">
<Image src="/slackLogo.png" alt={"slack logo"} width={20} height={20} />
<Image src="/slackLogo.png" alt={"slack logo"} width={40} height={40} />
</a>
</div>
</footer>
);
};

Footer.displayName = 'Footer';
export default Footer;
53 changes: 18 additions & 35 deletions services/web-app/src/components/header/header.tsx
Original file line number Diff line number Diff line change
@@ -1,45 +1,28 @@
"use client";
"use client"
import Image from "next/image";
import { SignInButton } from "@/components/buttons/signIn";
import { useSession } from "next-auth/react";
import { SignOutButton } from "../buttons/signOut";
import HeaderButton from "../buttons/headerBtn";
import Link from "next/link";
import { SignInButton } from '@/components/buttons/signIn';
import { useSession } from 'next-auth/react';
import { SignOutButton } from '../buttons/signOut';

export const Header = (): JSX.Element => {
const { data: session } = useSession();

return (
<header className="flex flex-row navbar justify-between items-center m-5">
<div className="flex items-center">
<div className="rounded-full overflow-hidden w-16 h-16">
<Image
src="/icon.png"
alt={"orion logo"}
width={100}
height={100}
layout="responsive"
/>
</div>
<Link className="text-4xl font-mono ml-4" href="/">
<header className="flex flex-row navbar justify-between items-center">
<Image src="/icon.png" alt={"orion logo"} width={100} height={100} />
<h1 className="text-4xl font-mono">
Code Review GPT
</Link>
</div>
<div className="flex items-center">
{session ? (
<div className="flex items-center">
<HeaderButton text="Profile" route="/profile" />
<div className="flex flex-col">
<SignOutButton />
</div>
</div>
) : (
<SignInButton />
)}
</div>
</h1>
{ session ? (
<div className="flex flex-col">
{session.user?.email}
<SignOutButton />
</div>
) : (
<SignInButton />
)}
</header>
);
};

Header.displayName = "Header";
export default Header;
Header.displayName = 'Header';
export default Header;
12 changes: 0 additions & 12 deletions services/web-app/src/components/loading/loading.tsx

This file was deleted.

28 changes: 0 additions & 28 deletions services/web-app/src/components/tables/repoTable.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions services/web-app/src/lib/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const dynamoClient = DynamoDBDocument.from(new DynamoDB({}), {
export const authOptions: NextAuthOptions = {
providers: [
GithubProvider({
clientId: process.env.GITHUB_ID as string || Config.GITHUB_ID,
clientSecret: process.env.GITHUB_SECRET as string || Config.GITHUB_SECRET,
clientId: Config.GITHUB_ID || process.env.GITHUB_ID,
clientSecret: Config.GITHUB_SECRET || process.env.GITHUB_SECRET,
}),
],
adapter: DynamoDBAdapter(dynamoClient, {
Expand Down
25 changes: 0 additions & 25 deletions services/web-app/src/styles/custom.css

This file was deleted.