File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,6 +164,16 @@ const Header = ({
164164 } ) ;
165165 } ;
166166
167+ const tweet = ( ) => {
168+ const link = `https://twitter.com/intent/tweet?text=Check%20this%20amazing%20app%20http://unshape.vercel.app/,%20created%20by%20@tapasadhikary%20and%20friends%0A%0A%23DEVCommunity%20%23100DaysOfCode%20%23unshape` ;
169+ if ( typeof window !== 'undefined' ) {
170+ window . open (
171+ link ,
172+ '_blank' // <- This is what makes it open in a new window.
173+ ) ;
174+ }
175+ }
176+
167177 return (
168178 < AppHeader >
169179 < Link href = "/" >
@@ -209,9 +219,9 @@ const Header = ({
209219 { ( user . email || user . displayName ) ? (
210220 < >
211221 < LoginBar >
212- < Button variant = "outline-secondary" size = "sm" className = "mr-1" onClick = { ( ) => setShowCreateShape ( true ) } >
222+ < Button variant = "outline-secondary" size = "sm" className = "mr-1" onClick = { tweet } >
213223 < FiTwitter />
214- Tweet us
224+ Tweet it
215225 </ Button >
216226 < Button variant = "primary" size = "sm" className = "mr-3" onClick = { ( ) => setShowCreateShape ( true ) } >
217227 < FiPlus />
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ const ShapePreview = (props) => {
7777 return (
7878 < >
7979 < Playground >
80- < Box height = "360px " width = "360px " onClick = { ( e ) => props . handleChange ( e ) } >
80+ < Box height = "300px " width = "300px " onClick = { ( e ) => props . handleChange ( e ) } >
8181 { props . shapeInformation . showShadow && < Shadow backgroundColor = { props . shapeInformation . backgroundColor } id = "shapeShadow" /> }
8282 < Component formula = { props . shapeInformation . formula } backgroundColor = { props . shapeInformation . backgroundColor } id = "clippedShape" />
8383 { vertices }
You can’t perform that action at this time.
0 commit comments