react_components_general #17

Open
dupsogod wants to merge 5 commits from react_components_general into master
Showing only changes of commit 423f274c73 - Show all commits
+20
View File
@@ -0,0 +1,20 @@
/**
* Сервис для полуения csrt токена для размещения в формах
* @date 24.07.2025
* @author dgavrilov
*/
export const getCsrfToken = ():string => {
const METATAG:HTMLElement|null = document.querySelector('meta[name="csrf-token"]');
if (!METATAG) {
return '';
}
const CSRFTOKEN:string|null = METATAG.getAttribute('content');
if (!CSRFTOKEN) {
return '';
}
return CSRFTOKEN;
}