Hello! im
Anthony Th
frontend developer
About me
( );
Anthony Th
Email: imprintcode@gmail.com
Phone: is found on the resume
Address: is found on the resume
Date of Birth: is found on the resume
Relocate: quite possibly
Remote or office: remote format is preferable
-
Pet-Projects
Skills
( );
My stack
C
C++
C#
CSS
Figma
Git
Html
JavaScript
React
React Redux
Sass
Node.js
TypeScript
Angular
Language skill
-
B2
English
-
A1
French
Experience
( );
Education
( );
Moscow Polytechnic University
2010 - 2015
The rest of the information is available in the resume.
Portfolio
( );
My Recent Work
This section presents projects from the "JS/FE Pre-School 2022" and "JavaScript/Front-end 2022Q1" courses.
This section presents projects from the "hobby".
Contact
( );
</>
code
( );
import axios from 'axios';
const BASE_URL = 'http://localhost:5000';
export function getProducts() {
return axios.get(`${BASE_URL}/api/products`)
.then(response => response.data);
}
export function getCartProducts(cart) {
return axios.post(`${BASE_URL}/api/products`, {cart})
.then(response => response.data);
}
export function login (data) {
return axios.post(`${BASE_URL}/api/auth`, { name: data.name, password: data.password })
.then(response => {
localStorage.setItem('x-access-token', response.data.token);
localStorage.setItem('x-access-token-expiration', Date.now() + 2 * 60 * 60 * 1000);
return response.data
})
.catch(err => Promise.reject('Error authentication!'));
}
export function isAuthenticated(){
return localStorage.getItem('x-access-token') && localStorage.getItem('x-access-token-expiration') > Date.now()
}