added Keycloak

This commit is contained in:
2024-06-11 20:43:52 +02:00
parent 0667d96de3
commit 36ca8c76d3
6 changed files with 117 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ import {faTimes} from "@fortawesome/free-solid-svg-icons";
import {postApi} from "./api/posts.api";
import {locationUtils} from "./utils/location";
import PostComment from "./components/PostComment";
import keycloak from "./Authentification/Keycloak";
const App = () => {
const [posts, setPosts] = useState([]);
@@ -79,6 +80,7 @@ const App = () => {
return (
<div className="app">
<button onClick={() => keycloak.logout()}>Logout</button>
<h1>SWA - Jodel</h1>
{!selectedPost && (
<div>
@@ -117,7 +119,7 @@ const App = () => {
</form>
<div className="comments">
{comments && <PostCommentList posts={comments} onPostClick={null} vote={vote}
type={"comments"}></PostCommentList>}
type={"comments"}></PostCommentList>}
</div>
</div>
)}