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

CSS for Login #11

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
39,566 changes: 39,566 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@supabase/supabase-js": "^1.25.2",
"@supabase/supabase-js": "^1.27.0",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"bootstrap": "^5.1.3",
"fastify-supabase": "^1.0.1",
"react": "^17.0.2",
"react-bootstrap": "^2.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"web-vitals": "^1.0.1"
Expand Down
Binary file added public/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 6 additions & 9 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import Dashboard from './pages/dashboard';

const SUPABASE_URL = "https://htburghwulpjmpkjxyrq.supabase.co";

const supabase = createClient(SUPABASE_URL, process.env.REACT_APP_SUPABASE_SERVICE_KEY);


function App() {
const [user, setUser] = useState(
supabase.auth.user()

);
/**
* When successfully Signed in you have
Expand All @@ -23,17 +23,14 @@ function App() {
console.log(userData);

const login = async () => {
const { user, error } = await supabase.auth.signIn({
provider: "github",
});

;

if (!error) {
setUser(user);
}

};

useEffect(() => {
setUser(supabase.auth.user());

}, []);

if (user) {
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';


ReactDOM.render(
<React.StrictMode>

<App />
</React.StrictMode>,
document.getElementById('root')
Expand Down
34 changes: 34 additions & 0 deletions src/pages/login.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.loginbg{
background: #f1bb0704;
background: -webkit-linear-gradient(top left, #50a3a2 0%, #53e3a6 100%);
background: -moz-linear-gradient(top left, #50a3a2 0%, #53e3a6 100%);
background: -o-linear-gradient(top left, #50a3a2 0%, #53e3a6 100%);
background: linear-gradient(to bottom right, #50a3a2 0%, #53e3a6 100%);
height: 600px;
display:flex;
justify-content: center;



}
.sigin{
width: 25% ;



}
.img{

margin-bottom: 2% ;
width: 100%;
height: 200px;

}
.box{

width: 100%;
}
h1{
margin-top: 50%;

}
Copy link
Member

Choose a reason for hiding this comment

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

Missing an endline here.

Suggested change
}
}

Copy link
Author

Choose a reason for hiding this comment

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

image
@Panquesito7 this photo

Copy link
Member

Choose a reason for hiding this comment

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

image @Panquesito7 this photo

I'm not sure what are you trying to say with that 😅 could you please clarify? Thanks.

30 changes: 19 additions & 11 deletions src/pages/login.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
import React from 'react';
import {Form,Button} from 'react-bootstrap';
import 'bootstrap/dist/css/bootstrap.min.css';
import './login.css';

const Login = ({ login }) => {
return <div>
<center>
<h1>Tech Phantoms Auth</h1>
</center>

<br />
<br />
const Login = ({ login }) => {

return (
<div className = "loginbg">

<Form className = "sigin">
<h1>Tech-Phantoms</h1>
<img className="img"src="banner.png" alt="haha" />

<center>
<button onClick={login}>Login</button>
</center>
</div>
<Button className ="box" variant="primary" type="submit" to href="https://github.com/login">
Login with Github
</Button>
</Form>

</div>
)

};


Expand Down
Loading