Skip to content

Commit 1588d7c

Browse files
committed
Merge branch 'Add-a-Landing-Page-#10' of https://github.com/TryShape/tryshape into Add-a-Landing-Page-#10
2 parents 2496902 + da5d8ef commit 1588d7c

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

components/utils/Header.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff 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 />

components/utils/ShapePreview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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}

0 commit comments

Comments
 (0)