-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: resolve eslint errors and run prettier
- Loading branch information
1 parent
8a72bf5
commit b666101
Showing
5 changed files
with
57 additions
and
42 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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
module.exports = { | ||
extends: ["@calblueprint/eslint-config-react", "eslint:recommended", "plugin:react/recommended", "plugin:prettier/recommended"], | ||
rules: { | ||
// Add any custom rules here | ||
// Disable the rule that requires React to be in scope -- we don't need this with React 18 | ||
'react/react-in-jsx-scope': 'off', | ||
'react/jsx-uses-react': 'off', | ||
}, | ||
}; | ||
extends: ["@calblueprint/eslint-config-react"], | ||
rules: { | ||
// Add any custom rules here | ||
// Disable the rule that requires React to be in scope -- we don't need this with React 18 | ||
'react/react-in-jsx-scope': 'off', | ||
'react/jsx-uses-react': 'off', | ||
}, | ||
}; |
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,20 +1,21 @@ | ||
import supabase from '@/api/supabase/createClient'; | ||
import supabase from '../createClient'; | ||
|
||
export const handleSignUp = async (email: string, password: string) => { | ||
const { data, error } = await supabase.auth.signUp({ | ||
email, | ||
password | ||
}) | ||
console.log(error) | ||
} | ||
const { data, error } = await supabase.auth.signUp({ | ||
email, | ||
password, | ||
}); | ||
console.log(error); | ||
}; | ||
|
||
export const signInWithEmail = async (email: string, password: string) => { | ||
const { data, error } = await supabase.auth.signInWithPassword({ | ||
email, password, | ||
}) | ||
console.log(data) | ||
} | ||
const { data, error } = await supabase.auth.signInWithPassword({ | ||
email, | ||
password, | ||
}); | ||
console.log(data); | ||
}; | ||
|
||
export const signOut = async () => { | ||
const { error } = await supabase.auth.signOut() | ||
} | ||
const { error } = await supabase.auth.signOut(); | ||
}; |
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,22 +1,22 @@ | ||
import './globals.css' | ||
import type { Metadata } from 'next' | ||
import { Inter } from 'next/font/google' | ||
import './globals.css'; | ||
import type { Metadata } from 'next'; | ||
import { Inter } from 'next/font/google'; | ||
|
||
const inter = Inter({ subsets: ['latin'] }) | ||
const inter = Inter({ subsets: ['latin'] }); | ||
|
||
export const metadata: Metadata = { | ||
title: 'Shanti Project', | ||
description: 'Application Created by Blueprint', | ||
} | ||
}; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode | ||
children: React.ReactNode; | ||
}) { | ||
return ( | ||
<html lang="en"> | ||
<body className={inter.className}>{children}</body> | ||
</html> | ||
) | ||
); | ||
} |
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,24 +1,38 @@ | ||
"use client" | ||
'use client'; | ||
|
||
import { useState } from 'react'; | ||
import { handleSignUp, signInWithEmail, signOut } from '@/api/supabase/auth/auth' | ||
import { | ||
handleSignUp, | ||
signInWithEmail, | ||
signOut, | ||
} from '../../api/supabase/auth/auth'; | ||
|
||
export default function Login() { | ||
const [email, setEmail] = useState('') | ||
const [password, setPassword] = useState('') | ||
const [email, setEmail] = useState(''); | ||
const [password, setPassword] = useState(''); | ||
|
||
return ( | ||
return ( | ||
<> | ||
<input name="email" onChange={(e) => setEmail(e.target.value)} value={email} /> | ||
<input | ||
name="email" | ||
onChange={e => setEmail(e.target.value)} | ||
value={email} | ||
/> | ||
<input | ||
type="password" | ||
name="password" | ||
onChange={(e) => setPassword(e.target.value)} | ||
onChange={e => setPassword(e.target.value)} | ||
value={password} | ||
/> | ||
<button type="button" onClick={() => handleSignUp(email, password)}>Sign up</button> | ||
<button type="button" onClick={() => signInWithEmail(email, password)}>Sign in</button> | ||
<button type="button" onClick={signOut}>Sign out</button> | ||
<button type="button" onClick={() => handleSignUp(email, password)}> | ||
Sign up | ||
</button> | ||
<button type="button" onClick={() => signInWithEmail(email, password)}> | ||
Sign in | ||
</button> | ||
<button type="button" onClick={signOut}> | ||
Sign out | ||
</button> | ||
</> | ||
) | ||
} | ||
); | ||
} |