-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C2S 261 - Onglet Modérateurs Utilisateurs #79
Conversation
9185e91
to
987c71e
Compare
@@ -50,7 +50,6 @@ export const Filters = () => { | |||
signal: newAbortController.signal, | |||
}) | |||
.then((response) => { | |||
console.log('response.data', response.data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
useEffect(() => { | ||
const sendMyToken = (token: string) => { | ||
let result: boolean | null; | ||
fetch('/api/public/login', { | ||
method: 'POST', | ||
headers: { 'Content-Type': 'text/plain' }, | ||
credentials: 'include', | ||
body: token, | ||
}) | ||
.then(() => { | ||
result = true; | ||
}) | ||
.catch(() => { | ||
result = false; | ||
}) | ||
.finally(() => { | ||
setIsLogged(true); | ||
return result; | ||
}); | ||
return ''; | ||
}; | ||
sendMyToken(keycloak.token!); | ||
}, [keycloak.token, setIsLogged]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ce bloc est utilisé plusieurs fois > Custom hook ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je vais merger cette US, je metterait un custom hook dans la PR qui concerne les établissements
987c71e
to
6512d9d
Compare
OcLoginContext
enLoginContext
.ModerateurUser