@@ -46,6 +46,7 @@ import { LinkOptions } from "./link-options";
46
46
export const DEFAULT_LINK_PROPS = (
47
47
linkType : LinkType ,
48
48
groupId : string | null = null ,
49
+ showBanner : boolean = true ,
49
50
) => ( {
50
51
id : null ,
51
52
name : null ,
@@ -71,7 +72,7 @@ export const DEFAULT_LINK_PROPS = (
71
72
questionType : null ,
72
73
enableAgreement : false ,
73
74
agreementId : null ,
74
- showBanner : linkType === LinkType . DOCUMENT_LINK ? true : false ,
75
+ showBanner : linkType === LinkType . DOCUMENT_LINK ? showBanner : false ,
75
76
enableWatermark : false ,
76
77
watermarkConfig : null ,
77
78
audienceType : groupId ? LinkAudienceType . GROUP : LinkAudienceType . GENERAL ,
@@ -141,13 +142,13 @@ export default function LinkSheet({
141
142
const { isFree, isDatarooms, isDataroomsPlus, isTrial } = usePlan ( ) ;
142
143
const analytics = useAnalytics ( ) ;
143
144
const [ data , setData ] = useState < DEFAULT_LINK_TYPE > (
144
- DEFAULT_LINK_PROPS ( linkType , groupId ) ,
145
+ DEFAULT_LINK_PROPS ( linkType , groupId , ! isDatarooms ) ,
145
146
) ;
146
147
const [ isLoading , setIsLoading ] = useState < boolean > ( false ) ;
147
148
const [ isSaving , setIsSaving ] = useState < boolean > ( false ) ;
148
149
149
150
useEffect ( ( ) => {
150
- setData ( currentLink || DEFAULT_LINK_PROPS ( linkType , groupId ) ) ;
151
+ setData ( currentLink || DEFAULT_LINK_PROPS ( linkType , groupId , ! isDatarooms ) ) ;
151
152
} , [ currentLink ] ) ;
152
153
153
154
const handlePreviewLink = async ( link : LinkWithViews ) => {
0 commit comments