refactor: enhance blog functionality with related blogs fetching, improved loading states, and tag filtering

This commit is contained in:
hamed
2025-11-19 11:32:09 +03:30
parent 235a64c378
commit e26d342c90
10 changed files with 251 additions and 130 deletions
+9 -1
View File
@@ -1,8 +1,16 @@
import axios from "axios";
import https from "https";
// Create axios instance with SSL verification disabled for development
const axiosInstance = axios.create({
httpsAgent: new https.Agent({
rejectUnauthorized: false
})
});
export const fetchReq = async (url, headers) => {
try {
const response = await axios.get(url, headers);
const response = await axiosInstance.get(url, headers);
return response.data;
} catch (error) {
console.error("fetchReq error:", error.message);