|
@@ -1,6 +1,6 @@
|
|
import { useState, useEffect } from 'react';
|
|
import { useState, useEffect } from 'react';
|
|
|
|
|
|
-import { getFirstDatabase } from 'src/db';
|
|
|
|
|
|
+import { getFirstDatabase, refreshDatabases } from 'src/db';
|
|
import { getData } from 'src/modules/map/regionData';
|
|
import { getData } from 'src/modules/map/regionData';
|
|
import { DbRegion } from './types';
|
|
import { DbRegion } from './types';
|
|
|
|
|
|
@@ -18,6 +18,7 @@ const useRegionData = (regionId: number) => {
|
|
});
|
|
});
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.error('Error fetching region data', error);
|
|
console.error('Error fetching region data', error);
|
|
|
|
+ refreshDatabases();
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|