Skip to content
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

Merged
merged 11 commits into from
Sep 21, 2024
Merged

Conversation

SamiTliliDNUM
Copy link
Contributor

@SamiTliliDNUM SamiTliliDNUM commented Sep 12, 2024

  • Renommer le context OcLoginContext en LoginContext.
  • Utiliser le contexte au niveau de la page Modérateur.
  • Refacto l'onglet ModerateurUser

@SamiTliliDNUM SamiTliliDNUM self-assigned this Sep 12, 2024
@SamiTliliDNUM SamiTliliDNUM changed the title C2S 261 C2S 261 - Onglet Modérateurs Utilisateurs Sep 13, 2024
@@ -50,7 +50,6 @@ export const Filters = () => {
signal: newAbortController.signal,
})
.then((response) => {
console.log('response.data', response.data);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

src/contexts/LoginContext.tsx Show resolved Hide resolved
src/utils/moderatorUser.helper.ts Outdated Show resolved Hide resolved
Comment on lines +17 to +39
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]);
Copy link
Contributor

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 ?

Copy link
Contributor Author

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

@SamiTliliDNUM SamiTliliDNUM merged commit f3b1c49 into dev Sep 21, 2024
3 checks passed
@olivier-rabot olivier-rabot deleted the c2s-261-using-context branch January 20, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants