Skip to content

Commit

Permalink
Merge pull request #4 from TechLabs-Dortmund/NextAuth
Browse files Browse the repository at this point in the history
Finally the OAuth process works but only when using GitHub instead of google
  • Loading branch information
Isztof authored Sep 5, 2023
2 parents b8e4faa + 05573a2 commit f62b417
Show file tree
Hide file tree
Showing 26 changed files with 1,064 additions and 263 deletions.
78 changes: 0 additions & 78 deletions app/(auth)/signin/page.tsx

This file was deleted.

82 changes: 0 additions & 82 deletions app/(auth)/signup/page.tsx

This file was deleted.

16 changes: 16 additions & 0 deletions app/(dashboard)/dashboard/add/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import AddFriendButton from "@/components/ui/AddFriendButton"
import {FC} from "react"



const Page: FC = ({}) => {
return (
<>
<h1 className="font-bold text-5xl mb-8">Welcome to our network!</h1>
<AddFriendButton/>
</>
)
}

export default Page

14 changes: 14 additions & 0 deletions app/(dashboard)/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {FC} from "react"
// This is the contacts overview page


const Page: FC = ({}) => {
return (
<>
<h1 className="font-bold text-5xl mb-8">All contacts </h1>
<a> <span>Find new People</span></a>
</>
)
}

export default Page
6 changes: 5 additions & 1 deletion app/(default)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { db } from '@/lib/db'

export const metadata = {
title: 'Home - Open PRO',
description: 'Page description',
Expand All @@ -9,7 +11,9 @@ import Newsletter from '@/components/newsletter'
import Zigzag from '@/components/zigzag'
import Testimonials from '@/components/testimonials'

export default function Home() {
export default async function Home() {
await db.set('hello', 'hello');

return (
<>
<div style={main}>
Expand Down
2 changes: 1 addition & 1 deletion app/(map)/map/Map.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";
import { useEffect, useRef } from "react";
import { Loader } from "@googlemaps/js-api-loader";
import { Loader } from "@googlemaps/js-api-loader";

function Map({ address }) {
const mapRef = useRef(null);
Expand Down
11 changes: 9 additions & 2 deletions app/(map)/map/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import { getServerSession } from "next-auth";
import Map from "../map/Map"
import { authOptions } from "@/lib/auth";

function MyPage() {
const page = async ({}) => {

const session = await getServerSession(authOptions)
return (
<div>
<div style={{backgroundColor: "whitesmoke"}}>
<h1>My Page</h1>
<pre> {JSON.stringify(session)}</pre>
<div style={{width: "400px",
height: "300px"
}}className="h-300"> </div>
Expand All @@ -12,4 +19,4 @@ function MyPage() {
</div>
);
}
export default MyPage;
export default page;
4 changes: 3 additions & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import './css/style.css'
import { Inter, Architects_Daughter } from 'next/font/google'

import Header from '@/components/ui/header'
import Providers from '@/components/ui/Providers'



const inter = Inter({
Expand Down Expand Up @@ -33,7 +35,7 @@ export default function RootLayout({
<body className={`${inter.variable} ${architects_daughter.variable} font-inter antialiased text-gray-200 tracking-tight`}>
<div className="flex flex-col min-h-screen overflow-hidden">
<Header />
{children}
<Providers> {children}</Providers>
</div>
</body>
</html>
Expand Down
File renamed without changes.
Loading

0 comments on commit f62b417

Please sign in to comment.