mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2026-02-01 20:10:35 +01:00
revert base params, clean top gap
This commit is contained in:
parent
039de2dde2
commit
c188cc3a0b
@ -186,7 +186,7 @@ export default function Workbench() {
|
||||
className="flex-1 min-h-0 relative z-10 workbench-scrollable "
|
||||
style={{
|
||||
transition: 'opacity 0.15s ease-in-out',
|
||||
paddingTop: currentView === 'viewer' ? '0' : activeFiles.length > 0 ? '3.5rem' : '0',
|
||||
paddingTop: 0,
|
||||
}}
|
||||
>
|
||||
{renderMainContent()}
|
||||
|
||||
@ -34,17 +34,16 @@ export function useBaseParameters<T>(config: BaseParametersConfig<T>): BaseParam
|
||||
}, [parameters, config.validateFn]);
|
||||
|
||||
const endpointName = config.endpointName;
|
||||
const isStringEndpoint = typeof endpointName === "string";
|
||||
|
||||
const getEndpointNameString = useCallback(() => {
|
||||
return endpointName as string;
|
||||
}, [endpointName]);
|
||||
|
||||
const getEndpointNameFunction = useCallback(() => {
|
||||
return (endpointName as (params: T) => string)(parameters);
|
||||
}, [endpointName, parameters]);
|
||||
|
||||
const getEndpointName = isStringEndpoint ? getEndpointNameString : getEndpointNameFunction;
|
||||
let getEndpointName: () => string;
|
||||
if (typeof endpointName === "string") {
|
||||
getEndpointName = useCallback(() => {
|
||||
return endpointName;
|
||||
}, []);
|
||||
} else {
|
||||
getEndpointName = useCallback(() => {
|
||||
return endpointName(parameters);
|
||||
}, [parameters]);
|
||||
}
|
||||
|
||||
return {
|
||||
parameters,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user