Skip to content

Commit

Permalink
Fixing build error reference issues
Browse files Browse the repository at this point in the history
  • Loading branch information
salty2011 committed Jan 15, 2025
1 parent b5426d9 commit 83496fd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/TaskManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const TaskManager: React.FC = () => {

{task.error && (
<Typography variant="body2" color="error">
Error: {task.error}
Error: {task.error.message}
</Typography>
)}
</Box>
Expand Down
2 changes: 1 addition & 1 deletion src/services/api/base.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Logger from '../logs';
import Logger from './logs';

export class ApiError extends Error {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/services/api/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Config, UserConfig } from './types';
import { handleApiResponse, handleApiError, ApiError } from '../base';
import Logger from '../../logs';
import Logger from '../logs';

class ConfigService {
private config: Config | null = null;
Expand Down
10 changes: 3 additions & 7 deletions src/services/api/logs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class LogService {

subscribe(subscriber: LogSubscriber): () => void {
this.subscribers.push(subscriber);
subscriber(this.logEntries);
return () => {
const index = this.subscribers.indexOf(subscriber);
if (index !== -1) {
Expand All @@ -30,7 +31,7 @@ class LogService {
}

// Notify subscribers
this.subscribers.forEach(subscriber => subscriber(entry));
this.subscribers.forEach(subscriber => subscriber(this.logEntries));

// Write to server
try {
Expand Down Expand Up @@ -116,12 +117,7 @@ class LogService {
await handleApiResponse<void>(response, 'LogService');
this.logEntries = [];
this.subscribers.forEach(subscriber => {
subscriber({
timestamp: new Date().toISOString(),
level: LogLevel.INFO,
message: 'Logs cleared',
component: 'LogService'
});
subscriber([]);
});
} catch (error) {
await handleApiError(error, 'LogService');
Expand Down
12 changes: 8 additions & 4 deletions src/services/api/steam/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ export interface SteamGame {
name: string;
playtime_forever: number;
img_icon_url: string;
has_community_visible_stats: boolean;
playtime_windows_forever: number;
playtime_mac_forever: number;
playtime_linux_forever: number;
img_logo_url: string;
rtime_last_played: number;
has_community_visible_stats?: boolean;
playtime_windows_forever?: number;
playtime_mac_forever?: number;
playtime_linux_forever?: number;
playtime_deck_forever?: number;
content_descriptorids?: number[];
playtime_disconnected?: number;
}

export interface SteamGridImage {
Expand Down

0 comments on commit 83496fd

Please sign in to comment.