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;
|
let { title } = Astro.props;
|
||||||
---
|
---
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@@ -20,8 +21,7 @@ let { title } = Astro.props;
|
|||||||
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<Header client:only />
|
||||||
</header>
|
|
||||||
<main>
|
<main>
|
||||||
<slot/>
|
<slot/>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
Reference in New Issue
Block a user