Skip to content

Commit

Permalink
docs blog consts
Browse files Browse the repository at this point in the history
  • Loading branch information
vincanger committed Dec 4, 2023
1 parent 21365e5 commit 0ed1c60
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion main.wasp
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
Original file line number Diff line number Diff line change
@@ -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 (
Expand All @@ -41,4 +41,4 @@ const Ecommerce = ({ user} : { user: User }) => {
);
};

export default Ecommerce;
export default Dashboard;
5 changes: 3 additions & 2 deletions src/client/components/AppNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/client/landing-page/LandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions src/client/landing-page/contentSections.ts
Original file line number Diff line number Diff line change
@@ -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 = [
{
Expand Down
3 changes: 3 additions & 0 deletions src/shared/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 0ed1c60

Please sign in to comment.