Start on header
This commit is contained in:
25
site/src/components/Header/index.jsx
Normal file
25
site/src/components/Header/index.jsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import React from "react";
|
||||
import { Auth0Provider } from "@auth0/auth0-react";
|
||||
import LoginButton from "../LoginButton";
|
||||
import LogoutButton from "../LogoutButton";
|
||||
import config from "../../config";
|
||||
import Styles from "./styles.module.scss";
|
||||
|
||||
const Header = () => {
|
||||
return (
|
||||
<header>
|
||||
<Auth0Provider
|
||||
domain={config.auth0.domain}
|
||||
clientId={config.auth0.clientId}
|
||||
redirectUri={window.location.origin}
|
||||
audience={config.auth0.audience}
|
||||
scope="read:stuff"
|
||||
>
|
||||
<LoginButton />
|
||||
<LogoutButton />
|
||||
</Auth0Provider>
|
||||
</header>
|
||||
);
|
||||
};
|
||||
|
||||
export default Header;
|
||||
4
site/src/components/Header/styles.module.scss
Normal file
4
site/src/components/Header/styles.module.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
header {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
---
|
||||
import Header from "../components/Header/index.jsx";
|
||||
let { title } = Astro.props;
|
||||
---
|
||||
<style lang="scss">
|
||||
@@ -20,8 +21,7 @@ let { title } = Astro.props;
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
</header>
|
||||
<Header client:only />
|
||||
<main>
|
||||
<slot/>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user