Fix ESLint warnings and errors
All checks were successful
Lint and Build / build (pull_request) Successful in 2m48s
All checks were successful
Lint and Build / build (pull_request) Successful in 2m48s
- Remove unused imports in test files - Fix unused variable warnings - Fix React unescaped entity warning in settings page - Remove unused error parameters in catch blocks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
0edead505f
commit
b974de37e8
4 changed files with 8 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { GET } from '../streams/route';
|
// import { GET } from '../streams/route';
|
||||||
|
|
||||||
// Mock the database module
|
// Mock the database module
|
||||||
jest.mock('@/lib/database', () => ({
|
jest.mock('@/lib/database', () => ({
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { GET } from '../teams/route';
|
// import { GET } from '../teams/route';
|
||||||
|
|
||||||
// Mock the database module
|
// Mock the database module
|
||||||
jest.mock('@/lib/database', () => ({
|
jest.mock('@/lib/database', () => ({
|
||||||
|
@ -13,7 +13,7 @@ jest.mock('@/lib/apiHelpers', () => ({
|
||||||
status,
|
status,
|
||||||
json: async () => ({ success: true, data }),
|
json: async () => ({ success: true, data }),
|
||||||
})),
|
})),
|
||||||
createDatabaseError: jest.fn((operation, error) => ({
|
createDatabaseError: jest.fn((operation) => ({
|
||||||
error: 'Database Error',
|
error: 'Database Error',
|
||||||
status: 500,
|
status: 500,
|
||||||
json: async () => ({
|
json: async () => ({
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { useState } from 'react';
|
||||||
import { useApiKey } from '@/contexts/ApiKeyContext';
|
import { useApiKey } from '@/contexts/ApiKeyContext';
|
||||||
|
|
||||||
export default function SettingsPage() {
|
export default function SettingsPage() {
|
||||||
const { apiKey, setApiKey, clearApiKey, isAuthenticated } = useApiKey();
|
const { setApiKey, clearApiKey, isAuthenticated } = useApiKey();
|
||||||
const [inputValue, setInputValue] = useState('');
|
const [inputValue, setInputValue] = useState('');
|
||||||
const [error, setError] = useState('');
|
const [error, setError] = useState('');
|
||||||
const [success, setSuccess] = useState('');
|
const [success, setSuccess] = useState('');
|
||||||
|
@ -62,7 +62,7 @@ export default function SettingsPage() {
|
||||||
<h2 className="text-xl font-semibold text-white mb-4">API Key Authentication</h2>
|
<h2 className="text-xl font-semibold text-white mb-4">API Key Authentication</h2>
|
||||||
<p className="text-base1 mb-6">
|
<p className="text-base1 mb-6">
|
||||||
API keys are required when accessing this application from external networks.
|
API keys are required when accessing this application from external networks.
|
||||||
The key is stored securely in your browser's local storage.
|
The key is stored securely in your browser's local storage.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -380,7 +380,7 @@ async function createStreamGroup(groupName, streamName, teamName, url, lockSourc
|
||||||
try {
|
try {
|
||||||
await obsClient.call('CreateScene', { sceneName: streamGroupName });
|
await obsClient.call('CreateScene', { sceneName: streamGroupName });
|
||||||
console.log(`Created nested scene "${streamGroupName}" for stream grouping`);
|
console.log(`Created nested scene "${streamGroupName}" for stream grouping`);
|
||||||
} catch (error) {
|
} catch {
|
||||||
console.log(`Nested scene "${streamGroupName}" might already exist`);
|
console.log(`Nested scene "${streamGroupName}" might already exist`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -535,7 +535,7 @@ async function createStreamGroup(groupName, streamName, teamName, url, lockSourc
|
||||||
console.error(`Failed to lock color source:`, lockError.message);
|
console.error(`Failed to lock color source:`, lockError.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch {
|
||||||
console.log('Color source background might already be in nested scene');
|
console.log('Color source background might already be in nested scene');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -559,7 +559,7 @@ async function createStreamGroup(groupName, streamName, teamName, url, lockSourc
|
||||||
console.error(`Failed to lock text source:`, lockError.message);
|
console.error(`Failed to lock text source:`, lockError.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch {
|
||||||
console.log('Text source might already be in nested scene');
|
console.log('Text source might already be in nested scene');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue