örnek login
` const handleSubmit = async (e) => {
e.preventDefault();
try {
const response = await axios.post('/api/login', credentials);
const { token, refreshToken } = response.data;
// Store the tokens in localStorage or secure cookie for later use
localStorage.setItem('token', token);
localStorage.setItem('refreshToken', refreshToken);
// Redirect or perform other actions upon successful login
} catch (error) {
// Handle login error
}}`