refactor(fitView): use same fitView function for viewport helper and initial prop

This commit is contained in:
Christopher Möller
2022-01-27 13:00:03 +01:00
parent 0244c93cb9
commit af52bab2a5
40 changed files with 169 additions and 184 deletions
+3 -3
View File
@@ -4,12 +4,12 @@ import cc from 'classcat';
import { AttributionPosition, ProOptions } from '../../types';
type AttributionProps = {
pro?: ProOptions;
proOptions?: ProOptions;
position?: AttributionPosition;
};
function Attribution({ pro, position = 'bottom-right' }: AttributionProps) {
if (pro?.account === 'paid-subscription' && pro?.hideAttribution) {
function Attribution({ proOptions, position = 'bottom-right' }: AttributionProps) {
if (proOptions?.account === 'paid-subscription' && proOptions?.hideAttribution) {
return null;
}