Skip to content

Commit

Permalink
fix: ocr error
Browse files Browse the repository at this point in the history
  • Loading branch information
Pylogmon committed Jun 24, 2024
1 parent 8d990ff commit 132fe6a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/window/Recognize/ControlArea/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
getServiceSouceType,
getServiceName,
INSTANCE_NAME_CONFIG_KEY,
getDisplayInstanceName,
} from '../../../utils/service_instance';

export const currentServiceInstanceKeyAtom = atom();
Expand All @@ -36,7 +37,7 @@ export default function ControlArea(props) {

function getInstanceName(instanceKey, serviceNameSupplier) {
const instanceConfig = serviceInstanceConfigMap[instanceKey] ?? {};
return instanceConfig[INSTANCE_NAME_CONFIG_KEY] ?? serviceNameSupplier();
return getDisplayInstanceName(instanceConfig[INSTANCE_NAME_CONFIG_KEY], serviceNameSupplier);
}

useEffect(() => {
Expand Down
3 changes: 2 additions & 1 deletion src/window/Recognize/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ export default function Recognize() {
}, [closeOnBlur]);

return (
pluginList && (
pluginList &&
serviceInstanceConfigMap !== null && (
<div
className={`bg-background h-screen ${
osType === 'Linux' && 'rounded-[10px] border-1 border-default-100'
Expand Down
10 changes: 6 additions & 4 deletions src/window/Translate/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,12 @@ export default function Translate() {
<div className={`${osType === 'Linux' ? 'h-[calc(100vh-37px)]' : 'h-[calc(100vh-35px)]'} px-[8px]`}>
<div className='h-full overflow-y-auto'>
<div>
<SourceArea
pluginList={pluginList}
serviceInstanceConfigMap={serviceInstanceConfigMap}
/>
{serviceInstanceConfigMap !== null && (
<SourceArea
pluginList={pluginList}
serviceInstanceConfigMap={serviceInstanceConfigMap}
/>
)}
</div>
<div className={`${hideLanguage && 'hidden'}`}>
<LanguageArea />
Expand Down

0 comments on commit 132fe6a

Please sign in to comment.