diff --git a/main.wasp b/main.wasp index 5f72de7..752baa8 100644 --- a/main.wasp +++ b/main.wasp @@ -228,7 +228,7 @@ page CheckoutPage { route AdminRoute { path: "/admin", to: DashboardPage } page DashboardPage { authRequired: true, - component: import Dashboard from "@client/admin/pages/Dashboard/Ecommerce" + component: import Dashboard from "@client/admin/pages/DashboardPage" } route AdminUsersRoute { path: "/admin/users", to: AdminUsersPage } diff --git a/src/client/admin/pages/Dashboard/ECommerce.tsx b/src/client/admin/pages/DashboardPage.tsx similarity index 70% rename from src/client/admin/pages/Dashboard/ECommerce.tsx rename to src/client/admin/pages/DashboardPage.tsx index d24a5bf..dac9d7c 100644 --- a/src/client/admin/pages/Dashboard/ECommerce.tsx +++ b/src/client/admin/pages/DashboardPage.tsx @@ -1,21 +1,21 @@ -import TotalSignupsCard from '../../components/TotalSignupsCard'; -import TotalPageViewsCard from '../../components/TotalPaidViewsCard'; -import TotalPayingUsersCard from '../../components/TotalPayingUsersCard'; -import TotalRevenueCard from '../../components/TotalRevenueCard'; -import RevenueAndProfitChart from '../../components/RevenueAndProfitChart'; -import SourcesTable from '../../components/SourcesTable'; -import DefaultLayout from '../../layout/DefaultLayout'; +import TotalSignupsCard from '../components/TotalSignupsCard'; +import TotalPageViewsCard from '../components/TotalPaidViewsCard'; +import TotalPayingUsersCard from '../components/TotalPayingUsersCard'; +import TotalRevenueCard from '../components/TotalRevenueCard'; +import RevenueAndProfitChart from '../components/RevenueAndProfitChart'; +import SourcesTable from '../components/SourcesTable'; +import DefaultLayout from '../layout/DefaultLayout'; import { useQuery } from '@wasp/queries'; import getDailyStats from '@wasp/queries/getDailyStats'; import { useHistory } from 'react-router-dom'; import type { User } from '@wasp/entities'; -const Ecommerce = ({ user} : { user: User }) => { +const Dashboard = ({ user }: { user: User }) => { const history = useHistory(); if (!user.isAdmin) { history.push('/'); } - + const { data: stats, isLoading, error } = useQuery(getDailyStats); return ( @@ -41,4 +41,4 @@ const Ecommerce = ({ user} : { user: User }) => { ); }; -export default Ecommerce; +export default Dashboard; diff --git a/src/client/components/AppNavBar.tsx b/src/client/components/AppNavBar.tsx index 48278d7..48de70f 100644 --- a/src/client/components/AppNavBar.tsx +++ b/src/client/components/AppNavBar.tsx @@ -4,11 +4,12 @@ import { HiBars3 } from 'react-icons/hi2'; import useAuth from '@wasp/auth/useAuth'; import logo from '../static/logo.png'; import DropdownUser from './DropdownUser'; +import { DOCS_URL, BLOG_URL } from '@wasp/shared/constants'; const navigation = [ { name: 'GPT Wrapper', href: '/gpt' }, - { name: 'Documentation', href: '#' }, // TODO: add link to docs - { name: 'Blog', href: '#' }, // TODO: add link to blog + { name: 'Documentation', href: DOCS_URL }, + { name: 'Blog', href: BLOG_URL }, ]; export default function AppNavBar() { diff --git a/src/client/landing-page/LandingPage.tsx b/src/client/landing-page/LandingPage.tsx index 72f0a1a..136d223 100644 --- a/src/client/landing-page/LandingPage.tsx +++ b/src/client/landing-page/LandingPage.tsx @@ -11,7 +11,7 @@ import useAuth from '@wasp/auth/useAuth'; import DropdownUser from '../components/DropdownUser'; import { useHistory } from 'react-router-dom'; import stripePayment from '@wasp/actions/stripePayment'; -import { STRIPE_CUSTOMER_PORTAL_LINK } from '@wasp/shared/constants'; +import { DOCS_URL, BLOG_URL, STRIPE_CUSTOMER_PORTAL_LINK } from '@wasp/shared/constants'; import { UserMenuItems } from '../components/UserMenuItems'; export default function LandingPage() { diff --git a/src/client/landing-page/contentSections.ts b/src/client/landing-page/contentSections.ts index 17de1bd..9544851 100644 --- a/src/client/landing-page/contentSections.ts +++ b/src/client/landing-page/contentSections.ts @@ -1,10 +1,10 @@ -import { TierIds } from '@wasp/shared/constants'; +import { TierIds, DOCS_URL, BLOG_URL } from '@wasp/shared/constants'; export const navigation = [ { name: 'Features', href: '#features' }, { name: 'Pricing', href: '#pricing' }, - { name: 'Documentation', href: '#' }, - { name: 'Blog', href: '#' }, + { name: 'Documentation', href: DOCS_URL }, + { name: 'Blog', href: BLOG_URL }, ]; export const features = [ { diff --git a/src/shared/constants.ts b/src/shared/constants.ts index e07a87d..6112107 100644 --- a/src/shared/constants.ts +++ b/src/shared/constants.ts @@ -4,6 +4,9 @@ export enum TierIds { ENTERPRISE = 'enterprise-tier', } +export const DOCS_URL = 'https://open-saas-docs.netlify.app'; +export const BLOG_URL = 'https://open-saas-blog.netlify.app/blog'; + //get this link at https://dashboard.stripe.com/test/settings/billing/portal const isDev = process.env.NODE_ENV === 'development'; const customerPortalTestUrl = 'https://billing.stripe.com/p/login/test_8wM8x17JN7DT4zC000';