Skip to content

Commit

Permalink
🥾🍖 ↣ Removing extra stuff from auth in preperation of moving back to …
Browse files Browse the repository at this point in the history
…React + supabase for [#13]
  • Loading branch information
Gizmotronn committed Nov 14, 2022
1 parent 83f14ba commit bce607b
Show file tree
Hide file tree
Showing 50 changed files with 46 additions and 26,955 deletions.
Binary file modified .DS_Store
Binary file not shown.
17 changes: 5 additions & 12 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,10 @@ import Spinner from 'react-bootstrap/Spinner';
// Menu components
import Sidebar from './components/SideBar Section/Sidebar';

// Auth components
import Authenticate from './auth/Authenticate';
import Login from './pages/Login';
import { UserContext } from './context/userContext';
import { checkUser } from './service/magic';
import Dashboard from './auth/Dashboard';
import PrivateRoute from './auth/PrivateRoute';
import { Switch, BrowserRouter as Router, Route, Redirect } from 'react-router-dom';

/* SupaAuth components
import Auth from './components/auth/SupAuth';
/* SupaAuth components */
import SupabaseAuth from './pages/Authenticate';
/*import Auth from './components/auth/SupAuth';
import SignIn from './pages/Signin';
import Account from './components/auth/Account';
import { supabase } from './components/auth/config/supabaseClient'; */

Expand Down Expand Up @@ -50,7 +43,7 @@ function App() {
<Router>
{user.isLoggedIn && <Redirect to={{ pathname: '/dashboard' }} />}
<Switch>
<Route exact path="/" component={Authenticate} />
<Route exact path="/" component={SupabaseAuth} />
<PrivateRoute path="/dashboard" component={Dashboard} />
</Switch>
</Router>
Expand Down
41 changes: 0 additions & 41 deletions src/components/PostForm.js

This file was deleted.

File renamed without changes.
40 changes: 40 additions & 0 deletions src/pages/Authenticate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { useState } from "react";
import { supabase } from "../lib/supabaseClient";

export default function SupabaseAuth() {
const [email, setEmail] = useState('');
const [submitted, setSubmitted] = useState(false);

async function signIn() {
const { error, data } = await supabase.auth.signIn({
email
});
if (error) {
console.log({ error });
} else {
setSubmitted(true);
}
}
if (submitted) {
return (
<div>
<h1>Please check your email to sign in</h1>
</div>
)
};

return (
<div>
<main>
<h1>
Sign in
</h1>
<input
onChange={e => setEmail(e.target.value)}
style={{ margin: 10 }}
/>
<button onClick={() => signIn()}>Sign In</button>
</main>
</div>
)
}
2 changes: 1 addition & 1 deletion src/pages/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Login = () => {
return (
<Container>
<Wrapper>
<h1>Test</h1>
<h1>Tess</h1>
</Wrapper>
</Container>
);
Expand Down
3 changes: 0 additions & 3 deletions supa-users/.eslintrc.json

This file was deleted.

36 changes: 0 additions & 36 deletions supa-users/.gitignore

This file was deleted.

11 changes: 0 additions & 11 deletions supa-users/Pipfile

This file was deleted.

34 changes: 0 additions & 34 deletions supa-users/README.md

This file was deleted.

Binary file removed supa-users/assets/Pages/bg.png
Binary file not shown.
9 changes: 0 additions & 9 deletions supa-users/assets/Pages/logo.svg

This file was deleted.

Binary file removed supa-users/assets/StatElements/TessStat.png
Binary file not shown.
Binary file removed supa-users/assets/bg/texture1.jpg
Binary file not shown.
Binary file removed supa-users/assets/logo-transparent.jpg
Binary file not shown.
Binary file removed supa-users/assets/logo.png
Binary file not shown.
Binary file removed supa-users/assets/video1.mov
Binary file not shown.
10 changes: 0 additions & 10 deletions supa-users/docs/.server/Adding Users.md

This file was deleted.

Binary file removed supa-users/docs/assets/requests/user-add-post.png
Binary file not shown.
6 changes: 0 additions & 6 deletions supa-users/lib/initSupabase.js

This file was deleted.

7 changes: 0 additions & 7 deletions supa-users/lib/supa_app.js

This file was deleted.

18 changes: 0 additions & 18 deletions supa-users/lib/supa_index.js

This file was deleted.

38 changes: 0 additions & 38 deletions supa-users/lib/supabaseLogin.js

This file was deleted.

15 changes: 0 additions & 15 deletions supa-users/lib/supabaseProfile.js

This file was deleted.

7 changes: 0 additions & 7 deletions supa-users/next.config.js

This file was deleted.

33 changes: 0 additions & 33 deletions supa-users/package.json

This file was deleted.

Loading

0 comments on commit bce607b

Please sign in to comment.