--- template/app/src/landing-page/LandingPage.tsx +++ opensaas-sh/app/src/landing-page/LandingPage.tsx @@ -1,24 +1,45 @@ import { Link } from 'wasp/client/router'; import { useAuth } from 'wasp/client/auth'; -import { useState } from 'react'; +import { useState, useEffect } from 'react'; import { Dialog } from '@headlessui/react'; -import { AiFillCloseCircle } from 'react-icons/ai'; +import { AiFillCloseCircle, AiFillGithub } from 'react-icons/ai'; import { HiBars3 } from 'react-icons/hi2'; import { BiLogIn } from 'react-icons/bi'; import logo from '../client/static/logo.png'; -import openSaasBanner from '../client/static/open-saas-banner.png'; -import { features, navigation, faqs, footerNavigation, testimonials } from './contentSections'; -import DropdownUser from '../client/../user/DropdownUser'; -import { UserMenuItems } from '../client/../user/UserMenuItems'; -import { DocsUrl } from '../client/../shared/common'; import DarkModeSwitcher from '../client/components/DarkModeSwitcher'; +import { + features, + navigation, + faqs, + footerNavigation, + testimonials, +} from './contentSections'; +import DropdownUser from '../user/DropdownUser'; +import { UserMenuItems } from '../user/UserMenuItems'; +import { DocsUrl, GithubUrl } from '../shared/common'; export default function LandingPage() { const [mobileMenuOpen, setMobileMenuOpen] = useState(false); - + const [repoInfo, setRepoInfo] = useState(null); + const { data: user, isLoading: isUserLoading } = useAuth(); - const NavLogo = () => Your SaaS App; + useEffect(() => { + const fetchRepoInfo = async () => { + try { + const response = await fetch( + 'https://api.github.com/repos/wasp-lang/open-saas' + ); + const data = await response.json(); + setRepoInfo(data); + } catch (error) { + console.error('Error fetching repo info', error); + } + }; + fetchRepoInfo(); + }, []); + + const NavLogo = () => Open SaaS App; return (
@@ -28,10 +49,10 @@
- Your Saas + Open Saas
@@ -57,14 +78,14 @@
{/* */} -
+
{isUserLoading ? null : !user ? ( -
- Log in +
+ Try the Demo App
) : ( @@ -73,7 +94,12 @@
- +
@@ -107,8 +133,8 @@
{isUserLoading ? null : !user ? ( -
- Log in +
+ Try the Demo App{' '}
) : ( @@ -134,7 +160,8 @@
@@ -152,30 +179,47 @@
-

- Some cool words about your product +

+ The free SaaS template with + superpowers

-

- With some more exciting words about your product! +

+ An open-source, feature-rich, full-stack React + NodeJS + template that manages features for you.

-
- App screenshot +
+
@@ -184,38 +228,36 @@ {/* Clients section */}
-

- Built with / Used by: +

+ Built and Ships with

-
- - - - - - - - - - -
-
- + React + NodeJS + Wasp +
+
-
+ Tailwind CSS + Stripe +

- The Best Features + 100% Open-Source

-

- Don't work harder. -
Work smarter. +

+ No vendor lock-in. +
Deploy anywhere.

{features.map((feature) => ( -
-
-
-
{feature.icon}
-
- {feature.name} -
-
{feature.description}
-
+ +
+
+
+
{feature.icon}
+
+ {feature.name} +
+
{feature.description}
+
+
))}
@@ -291,10 +347,18 @@

{testimonial.quote}

- - + +
-
{testimonial.name}
+
+ {testimonial.name} +
{testimonial.role}
@@ -307,20 +371,28 @@
{/* FAQ */} -
+

Frequently asked questions

-
+
{faqs.map((faq) => ( -
-
+
+
{faq.question}
-
-

{faq.answer}

+
+

+ {faq.answer} +

{faq.href && ( - + Learn more → )} @@ -335,7 +407,7 @@