@@ -108,24 +108,26 @@ export const onInitialize: OnInitialize = async (
108108 effects . preview . initialize ( overmindInstance . reaction ) ;
109109
110110 // show terms message on first visit since new terms
111- if ( ! effects . browser . storage . get ( seenTermsKey ) && ! state . isFirstVisit ) {
112- effects . notificationToast . add ( {
113- message :
114- 'Hello, our privacy policy has been updated recently. What’s new? CodeSandbox emails. Please read and reach out.' ,
115- title : 'Updated Privacy' ,
116- status : convertTypeToStatus ( 'notice' ) ,
117- sticky : true ,
118- actions : {
119- primary : [
120- {
121- label : 'Open Privacy Policy' ,
122- run : ( ) => {
123- window . open ( 'https://codesandbox.io/legal/privacy' , '_blank' ) ;
124- } ,
125- } ,
126- ] ,
127- } ,
128- } ) ;
129- effects . browser . storage . set ( seenTermsKey , true ) ;
111+ if ( effects . browser . storage . get ( seenTermsKey ) || state . isFirstVisit ) {
112+ return ;
130113 }
114+
115+ effects . notificationToast . add ( {
116+ message :
117+ 'Hello, our privacy policy has been updated recently. What’s new? CodeSandbox emails. Please read and reach out.' ,
118+ title : 'Updated Privacy' ,
119+ status : convertTypeToStatus ( 'notice' ) ,
120+ sticky : true ,
121+ actions : {
122+ primary : [
123+ {
124+ label : 'Open Privacy Policy' ,
125+ run : ( ) => {
126+ window . open ( 'https://codesandbox.io/legal/privacy' , '_blank' ) ;
127+ } ,
128+ } ,
129+ ] ,
130+ } ,
131+ } ) ;
132+ effects . browser . storage . set ( seenTermsKey , true ) ;
131133} ;
0 commit comments