From 630739dda12ffb022b0d363364892e7f1dd75611 Mon Sep 17 00:00:00 2001 From: Buyankhuu Tsolmonkhuu Date: Fri, 6 Oct 2023 16:24:03 -0700 Subject: [PATCH 1/2] refactor:changed folder name --- src/app/profileScreen/.env | 2 ++ src/app/profileScreen/page.tsx | 23 +++++++++++++++++++++++ src/app/profileScreen/style.ts | 22 ++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 src/app/profileScreen/.env create mode 100644 src/app/profileScreen/style.ts diff --git a/src/app/profileScreen/.env b/src/app/profileScreen/.env new file mode 100644 index 00000000..a9dfd72a --- /dev/null +++ b/src/app/profileScreen/.env @@ -0,0 +1,2 @@ +SUPABASE_URL = https://raqpvvgsmwarxhaialcz.supabase.co +REACT_APP_ANON_KEY = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJhcXB2dmdzbXdhcnhoYWlhbGN6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTYxODg2MTgsImV4cCI6MjAxMTc2NDYxOH0.triHI7DNSzNeAibtktBZ1b2wQuwnd0WL7R_yZYOJbPc \ No newline at end of file diff --git a/src/app/profileScreen/page.tsx b/src/app/profileScreen/page.tsx index 2d316dfe..3e370b18 100644 --- a/src/app/profileScreen/page.tsx +++ b/src/app/profileScreen/page.tsx @@ -1,3 +1,4 @@ +<<<<<<< HEAD export default function Profile() { return (
@@ -5,3 +6,25 @@ export default function Profile() {
); } +======= +'use client'; +import { LogOutButton, GlobalStyle } from './style'; +import { createClient } from '@supabase/supabase-js'; + +export default function Profile() { + return ( +
+ + signOut()}>Sign Out +
+ ); +} + +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) diff --git a/src/app/profileScreen/style.ts b/src/app/profileScreen/style.ts new file mode 100644 index 00000000..b708c88a --- /dev/null +++ b/src/app/profileScreen/style.ts @@ -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; +`; From c4a80b202167a11fa840139d99e3b2211ac65c6c Mon Sep 17 00:00:00 2001 From: Buyankhuu Tsolmonkhuu Date: Fri, 6 Oct 2023 16:41:18 -0700 Subject: [PATCH 2/2] chore:cleaning file format --- src/app/profileScreen/page.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/app/profileScreen/page.tsx b/src/app/profileScreen/page.tsx index 3e370b18..59174e45 100644 --- a/src/app/profileScreen/page.tsx +++ b/src/app/profileScreen/page.tsx @@ -1,12 +1,3 @@ -<<<<<<< HEAD -export default function Profile() { - return ( -
-
Profile
-
- ); -} -======= 'use client'; import { LogOutButton, GlobalStyle } from './style'; import { createClient } from '@supabase/supabase-js'; @@ -27,4 +18,4 @@ async function signOut() { ); const { error } = await supabase.auth.signOut(); } ->>>>>>> 22db8ee (refactor:changed folder name) +