Skip to content
Snippets Groups Projects
Commit 98b9232a authored by Mohammad Torkashvand's avatar Mohammad Torkashvand
Browse files

add axoid timeout

parent 94ee92ab
No related branches found
No related tags found
1 merge request!30Refactor data fetching and state management in MapsPage
......@@ -10,6 +10,8 @@ interface MapsProps {
networkTopologyData: NetworkTopologyData;
}
const AXIOS_TIMEOUT = 10000; // 10 seconds
const MapsPage: NextPage<MapsProps> = ({ networkTopologyData }) => {
return (
<WfoPolicyRenderPageFallback resource={GSOPolicyResource.NAVIGATION_MAPS}>
......@@ -20,7 +22,9 @@ const MapsPage: NextPage<MapsProps> = ({ networkTopologyData }) => {
export const getServerSideProps: GetServerSideProps = async () => {
try {
const response = await axios.get(process.env.NETWORK_TOPOLOGY_API_URL!);
const response = await axios.get(process.env.NETWORK_TOPOLOGY_API_URL!, {
timeout: AXIOS_TIMEOUT,
});
const networkTopologyData: NetworkTopologyData = response.data;
return {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment