Skip to content

Commit

Permalink
Replaced string routes with typed routes. (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
Martinsos authored May 22, 2024
1 parent 1623575 commit a1395d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions app/src/client/components/AppNavBar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link } from 'wasp/client/router';
import { Link, routes } from 'wasp/client/router';
import { useAuth } from 'wasp/client/auth';
import { useState } from 'react';
import { Dialog } from '@headlessui/react';
Expand All @@ -12,9 +12,9 @@ import DarkModeSwitcher from '../admin/components/DarkModeSwitcher';
import { UserMenuItems } from '../components/UserMenuItems';

const navigation = [
{ name: 'AI Scheduler (Demo App)', href: '/demo-app' },
{ name: 'File Upload (AWS S3)', href: '/file-upload' },
{ name: 'Pricing', href: '/pricing' },
{ name: 'AI Scheduler (Demo App)', href: routes.DemoAppRoute.build() },
{ name: 'File Upload (AWS S3)', href: routes.FileUploadRoute.build() },
{ name: 'Pricing', href: routes.PricingPageRoute.build() },
{ name: 'Documentation', href: DOCS_URL },
{ name: 'Blog', href: BLOG_URL },
];
Expand Down Expand Up @@ -60,7 +60,7 @@ export default function AppNavBar() {
</ul>

{isUserLoading ? null : !user ? (
<a href={!user ? '/login' : '/account'} className='text-sm font-semibold leading-6 ml-4'>
<a href={!user ? routes.LoginRoute.build() : routes.AccountRoute.build()} className='text-sm font-semibold leading-6 ml-4'>
<div className='flex items-center duration-300 ease-in-out text-gray-900 hover:text-yellow-500 dark:text-white'>
Log in <BiLogIn size='1.1rem' className='ml-1 mt-[0.1rem]' />
</div>
Expand Down
3 changes: 2 additions & 1 deletion app/src/client/landing-page/contentSections.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { DOCS_URL, BLOG_URL } from '../../shared/constants';
import daBoiAvatar from '../static/da-boi.png';
import avatarPlaceholder from '../static/avatar-placeholder.png';
import { routes } from 'wasp/client/router';

export const navigation = [
{ name: 'Features', href: '#features' },
{ name: 'Pricing', href: '/pricing' },
{ name: 'Pricing', href: routes.PricingPageRoute.build() },
{ name: 'Documentation', href: DOCS_URL },
{ name: 'Blog', href: BLOG_URL },
];
Expand Down

0 comments on commit a1395d7

Please sign in to comment.