Skip to content

Commit

Permalink
refactor:changed folder name
Browse files Browse the repository at this point in the history
  • Loading branch information
BuyankhuuTsCAl committed Oct 6, 2023
1 parent 2ddf3fc commit 630739d
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/profileScreen/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SUPABASE_URL = https://raqpvvgsmwarxhaialcz.supabase.co
REACT_APP_ANON_KEY = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJhcXB2dmdzbXdhcnhoYWlhbGN6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTYxODg2MTgsImV4cCI6MjAxMTc2NDYxOH0.triHI7DNSzNeAibtktBZ1b2wQuwnd0WL7R_yZYOJbPc
23 changes: 23 additions & 0 deletions src/app/profileScreen/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
<<<<<<< HEAD
export default function Profile() {
return (
<main>
<div>Profile</div>
</main>
);
}
=======
'use client';
import { LogOutButton, GlobalStyle } from './style';
import { createClient } from '@supabase/supabase-js';

export default function Profile() {
return (
<main>
<GlobalStyle />
<LogOutButton onClick={() => signOut()}>Sign Out</LogOutButton>
</main>
);
}

async function signOut() {
const supabase = createClient(
'https://raqpvvgsmwarxhaialcz.supabase.co',
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJhcXB2dmdzbXdhcnhoYWlhbGN6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTYxODg2MTgsImV4cCI6MjAxMTc2NDYxOH0.triHI7DNSzNeAibtktBZ1b2wQuwnd0WL7R_yZYOJbPc',
);
const { error } = await supabase.auth.signOut();
}
>>>>>>> 22db8ee (refactor:changed folder name)
22 changes: 22 additions & 0 deletions src/app/profileScreen/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import styled, { createGlobalStyle } from 'styled-components';

export const GlobalStyle = createGlobalStyle`
body {
background:white;
}
`;

export const LogOutButton = styled.button`
background: #00507f;
color: #fff;
text-align: center;
font-family: Inter;
font-size: 20px;
font-style: normal;
font-weight: 500;
line-height: normal;
border: transparent;
border-radius: 5px;
width: 300px;
height: 50px;
`;

0 comments on commit 630739d

Please sign in to comment.