mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 03:11:12 -05:00
Refactor: Update type safety status
This commit is contained in:
@@ -107,7 +107,7 @@ export function useEntityVersions(entityType: EntityType, entityId: string) {
|
||||
setCurrentVersion(versionsWithProfiles.find(v => v.is_current) || null);
|
||||
setLoading(false);
|
||||
}
|
||||
} catch (error) {
|
||||
} catch (error: unknown) {
|
||||
const errorMsg = getErrorMessage(error);
|
||||
console.error('Error fetching versions:', errorMsg);
|
||||
|
||||
@@ -139,7 +139,7 @@ export function useEntityVersions(entityType: EntityType, entityId: string) {
|
||||
if (error) throw error;
|
||||
|
||||
return data;
|
||||
} catch (error) {
|
||||
} catch (error: unknown) {
|
||||
const errorMsg = getErrorMessage(error);
|
||||
console.error('Error comparing versions:', errorMsg);
|
||||
if (isMountedRef.current) {
|
||||
@@ -171,7 +171,7 @@ export function useEntityVersions(entityType: EntityType, entityId: string) {
|
||||
await fetchVersions();
|
||||
}
|
||||
return data;
|
||||
} catch (error) {
|
||||
} catch (error: unknown) {
|
||||
const errorMsg = getErrorMessage(error);
|
||||
console.error('Error rolling back version:', errorMsg);
|
||||
if (isMountedRef.current) {
|
||||
@@ -193,7 +193,7 @@ export function useEntityVersions(entityType: EntityType, entityId: string) {
|
||||
if (channelRef.current) {
|
||||
try {
|
||||
supabase.removeChannel(channelRef.current);
|
||||
} catch (error) {
|
||||
} catch (error: unknown) {
|
||||
console.error('Error removing previous channel:', error);
|
||||
} finally {
|
||||
channelRef.current = null;
|
||||
|
||||
Reference in New Issue
Block a user