Skip to content

Commit

Permalink
all
Browse files Browse the repository at this point in the history
  • Loading branch information
bbarclay committed Oct 9, 2024
1 parent 5933fc1 commit 27907ea
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
26 changes: 26 additions & 0 deletions frontend/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,2 +1,28 @@
// Updated API endpoint from '/auth' to '/api/auth'
// src/app/layout.tsx

import React from 'react';
import { Inter } from 'next/font/google';
import './globals.css';
import { AuthProvider } from '../contexts/AuthContext';

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

export const metadata = {
title: 'Amazing Dashboard',
description: 'A powerful dashboard for amazing things',
};

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={inter.className}>
<AuthProvider>{children}</AuthProvider>
</body>
</html>
);
}
8 changes: 6 additions & 2 deletions frontend/src/contexts/AuthContext.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use client';

import React, { createContext, useState, useContext, useEffect, ReactNode } from 'react';
import { User, Session, Provider } from '@supabase/supabase-js';
import { User, Provider } from '@supabase/supabase-js';

interface AuthContextType {
user: User | null;
Expand Down Expand Up @@ -61,7 +63,9 @@ export function AuthProvider({ children }: { children: ReactNode }) {
};

const socialLogin = async (provider: Provider) => {
// Implement social login if needed
// TODO: Implement social login using the provider
console.log(`Social login with provider: ${provider}`);
throw new Error('Social login not implemented');
};

return (
Expand Down

1 comment on commit 27907ea

@vercel
Copy link

@vercel vercel bot commented on 27907ea Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

amazingmail – ./

amazingmail-git-main-amazingco.vercel.app
amazingmail.vercel.app
amazingmail-amazingco.vercel.app

Please sign in to comment.