diff --git a/.gitignore b/.gitignore index b242f9c8..19935cbe 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ # VS Code .vscode/ +.next +node_modules \ No newline at end of file diff --git a/www/.gitignore b/www/.gitignore index e985853e..4e0e1925 100644 --- a/www/.gitignore +++ b/www/.gitignore @@ -1 +1,3 @@ .vercel +.next +node_modules \ No newline at end of file diff --git a/www/components/AccentButton.tsx b/www/components/AccentButton.tsx index 35d6f0ee..1480e4f9 100644 --- a/www/components/AccentButton.tsx +++ b/www/components/AccentButton.tsx @@ -1,36 +1,44 @@ -import React, {ReactNode} from 'react'; +import { ReactNode } from "react" -import {FontAwesomeIcon} from '@fortawesome/react-fontawesome' -import {IconProp} from "@fortawesome/fontawesome-svg-core"; - -import Link from 'next/link' +import Link from "next/link" type AccentButtonProps = { - link?: string, - compact?: boolean, - className?: string, - children: ReactNode -}; - -const AccentButton = ({link, className, compact, children}: AccentButtonProps) => { - const paddingy = compact ? "pt-1 pb-1" : "pt-2 pb-2"; - - const classNameEval = className === undefined ? `text-white bg-brand-600 hover:bg-brand-400 font-bold ${paddingy} pr-3 pl-3 text-sm` : className; - - const button = ; - - if (link === undefined) { - return button; - } else { - return - - {button} - - - } -}; - -export default AccentButton; \ No newline at end of file + link?: string + compact?: boolean + className?: string + children: ReactNode +} + +const AccentButton = ({ + link, + className, + compact, + children, +}: AccentButtonProps) => { + const paddingy = compact ? "pt-1 pb-1" : "pt-2 pb-2" + + const classNameEval = + className === undefined + ? `text-white bg-brand-600 hover:bg-brand-400 font-bold ${paddingy} pr-3 pl-3 text-sm` + : className + + const button = ( + + ) + + if (link === undefined) { + return button + } else { + return ( + + {button} + + ) + } +} + +export default AccentButton diff --git a/www/components/AnnouncementBar/index.tsx b/www/components/AnnouncementBar/index.tsx index e85534f0..06a0f8ff 100644 --- a/www/components/AnnouncementBar/index.tsx +++ b/www/components/AnnouncementBar/index.tsx @@ -1,39 +1,39 @@ -import React, {useState} from "react" +import { useState } from "react" import styles from "./styles.module.css" const AnnouncementBar = () => { - const [isClosed, setClosed] = useState(false); + const [isClosed, setClosed] = useState(false) - if (isClosed) { - return null - } + if (isClosed) { + return null + } - return ( -
-

- ⭐️ If you like Synth,  - - give it a star on GitHub - - ! -

+ return ( +
+

+ ⭐️ If you like Synth,  + + give it a star on GitHub + + ! +

- -
- ) + +
+ ) } -export default AnnouncementBar \ No newline at end of file +export default AnnouncementBar diff --git a/www/components/CallToAction.tsx b/www/components/CallToAction.tsx index 1ec73f28..ce32f24a 100644 --- a/www/components/CallToAction.tsx +++ b/www/components/CallToAction.tsx @@ -1,28 +1,33 @@ -import AccentButton from "./AccentButton"; -import {faExternalLinkAlt} from "@fortawesome/free-solid-svg-icons"; -import {useRouter} from "next/router"; +import { useRouter } from "next/router" type CallToActionProps = { - copy?: string + copy?: string } -const CallToAction = ({copy}: CallToActionProps) => { - const {basePath} = useRouter(); - copy = copy == null ? "Synth helps you write better software, faster. Join the community!" : copy; - return ( -
-
-
-
- {copy} -
-
- discord -
-
-
+const CallToAction = ({ copy }: CallToActionProps) => { + const { basePath } = useRouter() + copy = + copy == null + ? "Synth helps you write better software, faster. Join the community!" + : copy + return ( +
+
+
+
{copy}
+
+ + discord + +
- ) +
+
+ ) } export default CallToAction diff --git a/www/components/Card.tsx b/www/components/Card.tsx index c95f3cc4..73c57f46 100644 --- a/www/components/Card.tsx +++ b/www/components/Card.tsx @@ -1,48 +1,42 @@ -import React, {useState} from 'react'; -import {useRouter} from 'next/router'; +import { useState } from "react" +import { useRouter } from "next/router" -import LearnMore from "./LearnMore"; +import LearnMore from "./LearnMore" type CardProps = { - header?: string, - title: string, - imageUrl: string, - copy?: string, - link?: string, + header?: string + title: string + imageUrl: string + copy?: string + link?: string } -const Card = ({header, title, copy, imageUrl, link}: CardProps) => { - const {basePath} = useRouter(); - const [arrow, setArrow] = useState(false); - return ( - -
setArrow(true)} - onMouseLeave={() => setArrow(false)} - > -
- {title}/ -
-
- { - header &&
- {header} -
- } -
- {title} -
- { - copy &&
- {copy} -
- } - -
-
-
- ); +const Card = ({ header, title, copy, imageUrl, link }: CardProps) => { + const { basePath } = useRouter() + const [arrow, setArrow] = useState(false) + return ( + +
setArrow(true)} + onMouseLeave={() => setArrow(false)} + > +
+ {title} +
+
+ {header &&
{header}
} +
{title}
+ {copy &&
{copy}
} + +
+
+
+ ) } -export default Card; \ No newline at end of file +export default Card diff --git a/www/components/CardNoLink.tsx b/www/components/CardNoLink.tsx index 363bbe4f..4e339e0b 100644 --- a/www/components/CardNoLink.tsx +++ b/www/components/CardNoLink.tsx @@ -1,40 +1,30 @@ -import React, {useState} from 'react'; +import { useState } from "react" type CardProps = { - header?: string, - title: string, - copy?: string, - path?: string, + header?: string + title: string + copy?: string + path?: string } -const CardNoLink = ({header, title, copy, path}: CardProps) => { - const [arrow, setArrow] = useState(false); - return ( -
setArrow(true)} - onMouseLeave={() => setArrow(false)} - > -
- -
-
- { - header &&
- {header} -
- } -
- {title} -
- { - copy &&
- {copy} -
- } -
-
- ); +const CardNoLink = ({ header, title, copy, path }: CardProps) => { + const [arrow, setArrow] = useState(false) + return ( +
setArrow(true)} + onMouseLeave={() => setArrow(false)} + > +
+ +
+
+ {header &&
{header}
} +
{title}
+ {copy &&
{copy}
} +
+
+ ) } -export default CardNoLink; \ No newline at end of file +export default CardNoLink diff --git a/www/components/Code.tsx b/www/components/Code.tsx index c313b8fb..1a00b872 100644 --- a/www/components/Code.tsx +++ b/www/components/Code.tsx @@ -1,30 +1,40 @@ -import ReactTooltip from 'react-tooltip'; +import ReactTooltip from "react-tooltip" // Todo should rename this to something more descriptive type CodeProps = { - code: string, - lang?: string + code: string + lang?: string } const copyToClipboard = (code) => { - navigator.clipboard.writeText(code); + navigator.clipboard.writeText(code) } -const Code = ({code, lang}: CodeProps) => { - const language = lang ? lang : "language-javascript"; - return ( -
-
-                    
-                        $ {code}
-                    
-                
- copyToClipboard(code)}> - Copied to clipboard! - -
- ); +const Code = ({ code, lang }: CodeProps) => { + const language = lang ? lang : "language-javascript" + return ( +
+
+        $ {code}
+      
+ copyToClipboard(code)} + > + Copied to clipboard! + +
+ ) } -export default Code; \ No newline at end of file +export default Code diff --git a/www/components/Contact.tsx b/www/components/Contact.tsx index 0e09232e..e01b99f3 100644 --- a/www/components/Contact.tsx +++ b/www/components/Contact.tsx @@ -1,79 +1,109 @@ -import Section from './Section' +import Section from "./Section" const Contact = () => { - return
-
-
- Drop us a line. -
- + return ( +
+
+
+ Drop us a line.
+ +
+ ) } -import {useForm} from '@formspree/react'; +import { useForm } from "@formspree/react" function MyForm() { - const [state, handleSubmit] = useForm('maypbzgq'); - if (state.succeeded) { - return
Thank you for your message! We'll get back to you shortly.
; - } - // @ts-ignore - return ( -
-
-
- - -
-
- - -
-
-
-
- - -
-
-
-
- -