diff --git a/view/src/lib/firebase.ts b/view/src/lib/firebase.ts new file mode 100644 index 0000000..52393fa --- /dev/null +++ b/view/src/lib/firebase.ts @@ -0,0 +1,16 @@ + +import { getAuth } from 'firebase/auth'; +import { initializeApp } from 'firebase/app'; + +const app = initializeApp({ + apiKey: 'AIzaSyCrJBW3c3Wut8DqjyVJoFAEyJ9Had__q-Q', + authDomain: 'me-fit-a9365.firebaseapp.com', + projectId: 'me-fit-a9365', + storageBucket: 'me-fit-a9365.appspot.com', + messagingSenderId: '631045688520', + appId: '1:631045688520:web:c7e0534927b52b0db629fd' +}); + +const auth = getAuth(app); + +export { auth }; diff --git a/view/src/routes/+layout.svelte b/view/src/routes/+layout.svelte index 78e4c12..08406dd 100644 --- a/view/src/routes/+layout.svelte +++ b/view/src/routes/+layout.svelte @@ -1,59 +1,44 @@ -

Tailwind working

- - - - - -

{user?.email}

+
+ ME-FIT + {#if user} +

{user?.email}

+ + {:else} + Login + {/if} +
diff --git a/view/src/routes/+page.svelte b/view/src/routes/+page.svelte index 5982b0a..5ba6853 100644 --- a/view/src/routes/+page.svelte +++ b/view/src/routes/+page.svelte @@ -1,2 +1,3 @@ -

Welcome to SvelteKit

-

Visit kit.svelte.dev to read the documentation

+
+

Welcome to ME-FIT

+
diff --git a/view/src/routes/login/+page.svelte b/view/src/routes/login/+page.svelte index 14be225..f88933e 100644 --- a/view/src/routes/login/+page.svelte +++ b/view/src/routes/login/+page.svelte @@ -1 +1,65 @@ -

Login

+ + +
+

Login

+ + + + + + {#if errorStr} +

{errorStr}

+ {/if} +