mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-07 06:08:54 +00:00
tokens refresh when jwt is expired and added basic axios config
This commit is contained in:
parent
c48498af95
commit
fbf645ba0f
15 changed files with 470 additions and 289 deletions
|
@ -1,6 +1,10 @@
|
|||
import "./footer.css";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useAuth } from "../api/Auth";
|
||||
function Footer() {
|
||||
const { user } = useAuth();
|
||||
const { logout } = useAuth();
|
||||
|
||||
return (
|
||||
<footer className="footer">
|
||||
<div className="footer-left">
|
||||
|
@ -11,6 +15,7 @@ function Footer() {
|
|||
<a
|
||||
href="https://github.com/bubblecup-12/VogelSocialMedia"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="footer-link github"
|
||||
>
|
||||
<img src="/assets/icons/github-mark.svg" alt="GitHub mark" />
|
||||
|
@ -18,17 +23,24 @@ function Footer() {
|
|||
<img src="/assets/icons/GitHub_Logo.png" alt="GitHub logo" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div className="footer-right">
|
||||
<Link className="footer-link" to="/">
|
||||
Feed
|
||||
</Link>
|
||||
<Link className="footer-link" to="login">
|
||||
Login
|
||||
</Link>
|
||||
<Link className="footer-link" to="/register">
|
||||
Sign up
|
||||
</Link>
|
||||
{user ? (
|
||||
<a className="footer-link" onClick={logout}>
|
||||
Logout
|
||||
</a>
|
||||
) : (
|
||||
<>
|
||||
<Link className="footer-link" to="login">
|
||||
Login
|
||||
</Link>
|
||||
<Link className="footer-link" to="/register">
|
||||
Sign up
|
||||
</Link>
|
||||
</>
|
||||
)}
|
||||
<Link className="footer-link" to="/">
|
||||
Create Post
|
||||
</Link>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue