Skip to content

Commit

Permalink
fix: additional logs removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Saelmala committed Nov 12, 2024
1 parent c201fb8 commit 1cee7b3
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ export async function getPipelineRenderingEngine(
try {
return await response.json();
} catch (error) {
console.error('Failed to parse successful JSON response:', error);
throw new Error('Parsing error in successful response.');
}
}
Expand All @@ -595,7 +594,6 @@ export async function getPipelineRenderingEngine(
try {
throw JSON.parse(responseText);
} catch (error) {
console.error('Failed to parse JSON error response:', error);
throw new Error(`Failed to parse JSON error response: ${responseText}`);
}
} else {
Expand Down Expand Up @@ -626,7 +624,6 @@ export async function getPipelineRenderingEngineHtml(
try {
return await response.json();
} catch (error) {
console.error('Failed to parse successful JSON response:', error);
throw new Error('Parsing error in successful response.');
}
}
Expand All @@ -638,7 +635,6 @@ export async function getPipelineRenderingEngineHtml(
try {
throw JSON.parse(responseText);
} catch (error) {
console.error('Failed to parse JSON error response:', error);
throw new Error(`Failed to parse JSON error response: ${responseText}`);
}
} else {
Expand Down Expand Up @@ -669,7 +665,6 @@ export async function getPipelineRenderingEngineMedia(
try {
return await response.json();
} catch (error) {
console.error('Failed to parse successful JSON response:', error);
throw new Error('Parsing error in successful response.');
}
}
Expand All @@ -681,7 +676,6 @@ export async function getPipelineRenderingEngineMedia(
try {
throw JSON.parse(responseText);
} catch (error) {
console.error('Failed to parse JSON error response:', error);
throw new Error(`Failed to parse JSON error response: ${responseText}`);
}
} else {
Expand Down
4 changes: 3 additions & 1 deletion src/app/production/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ export default function ProductionConfiguration({ params }: PageProps) {
const production = config.isActive
? config
: checkProductionPipelines(config, pipelines);

putProduction(production._id, production);
setProductionSetup(production);
setConfigurationName(production.name);
Expand Down Expand Up @@ -338,6 +339,7 @@ export default function ProductionConfiguration({ params }: PageProps) {
);
}
}

putProduction(productionSetup?._id.toString(), updatedPreset).then(() => {
refreshProduction();
});
Expand Down Expand Up @@ -398,6 +400,7 @@ export default function ProductionConfiguration({ params }: PageProps) {
)
}
};

setProductionSetup(updatedProduction);
});
}
Expand Down Expand Up @@ -1115,7 +1118,6 @@ export default function ProductionConfiguration({ params }: PageProps) {
);
if (!updatedSetup) return;
setProductionSetup(updatedSetup);

putProduction(
updatedSetup._id.toString(),
updatedSetup
Expand Down
10 changes: 2 additions & 8 deletions src/components/copyToClipboard/CopyItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,9 @@ export const CopyItem = ({
if ('clipboard' in navigator) {
navigator.clipboard
.writeText(valueToCopy)
.then(() => {
handleCopyResult('SUCCESS');
})
.catch(() => {
console.log('Something went wrong copying:', valueToCopy);
handleCopyResult('ERROR');
});
.then(() => handleCopyResult('SUCCESS'))
.catch(() => handleCopyResult('ERROR'));
} else {
console.log('Clipboard API not available:', valueToCopy);
handleCopyResult('ERROR');
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/copyToClipboard/CopyToClipboard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import React, { useEffect } from 'react';
import React from 'react';
import CopyItem from './CopyItem';
import { WhepMultiview } from '../../interfaces/whep';
import { SrtOutput } from '../../interfaces/pipeline';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ export function ConfigureMultiviewModal({
return;
}

console.log('production ID - to save', newMultiviewLayout?._id);
await addNewLayout(newMultiviewLayout);
setNewMultiviewLayout(null);
setLayoutModalOpen(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ export default function MultiviewLayoutSettings({
newPresetName
);

useEffect(() => {
console.log('production ID - main layout', production?._id);
}, [production?._id]);

const deleteLayout = useDeleteMultiviewLayout();
const t = useTranslate();

Expand Down
1 change: 0 additions & 1 deletion src/components/pipeline/PipelineCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export function PipelineCard({ pipelineId, isActive }: PipelineCardProps) {
}, [isActive]);

const SrtInfo = data?.status;

if (SrtInfo === undefined) {
return null;
}
Expand Down
3 changes: 1 addition & 2 deletions src/hooks/productions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ export function useGetProduction() {
headers: [['x-api-key', `Bearer ${API_SECRET_KEY}`]]
});
if (response.ok) {
const res = response.json();
return res;
return response.json();
}
throw await response.text();
};
Expand Down
1 change: 0 additions & 1 deletion src/hooks/useConfigureMultiviewLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export function useConfigureMultiviewLayout(

useEffect(() => {
if (productionId && preset && (defaultLabel || source)) {
console.log('production ID - layout hook', productionId);
const arr: MultiviewViews[] = [];
preset.layout.views.map((item, index) => {
if (index.toString() === viewId) {
Expand Down

0 comments on commit 1cee7b3

Please sign in to comment.