Skip to content
Snippets Groups Projects
Commit 10385e34 authored by Rémi PAILHAREY's avatar Rémi PAILHAREY :fork_knife_plate:
Browse files

use links from router

parent 579adeff
No related branches found
No related tags found
1 merge request!98feat: update visuals
Pipeline #58443 failed
......@@ -2,6 +2,7 @@ import { useContext, useState } from 'react'
import axios from 'axios'
import { UserContext } from './userContext'
import { useHistory } from 'react-router-dom'
import { links } from '../components/Routes/Router'
export interface Auth {
loginUser: () => Promise<void>
......@@ -38,7 +39,7 @@ export const useAuth = (): Auth => {
const { data } = await axios.get(`/api/common/WhoAmI`)
if (data && setUser) {
setUser(data)
history.push('/editing')
history.push(links.newsletter.path)
}
} catch (e) {
setError(e)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment