Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
harishmohanraj committed Apr 15, 2024
1 parent 2f0d35c commit 8a4d039
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 47 deletions.
22 changes: 16 additions & 6 deletions app/src/client/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import AppNavBar from './components/AppNavBar';
import ServerNotRechableComponent from './components/ServerNotRechableComponent';
import LoadingComponent from './components/LoadingComponent';
import TosAndMarketingEmailsModal from './components/TosAndMarketingEmailsModal';
import Footer from './components/Footer';
import { useMemo, useEffect, ReactNode, useState } from 'react';
import { useLocation } from 'react-router-dom';

Expand Down Expand Up @@ -32,9 +33,10 @@ export default function App({ children }: { children: ReactNode }) {

const shouldDisplayAppNavBar = useMemo(() => {
return (
location.pathname !== '/' &&
location.pathname !== '/login' &&
location.pathname !== '/signup'
location.pathname !== '/'
// &&
// location.pathname !== '/login' &&
// location.pathname !== '/signup'
);
}, [location]);

Expand Down Expand Up @@ -114,9 +116,9 @@ export default function App({ children }: { children: ReactNode }) {
)}
</>
) : (
<>
<div className='relative flex flex-col min-h-screen justify-between'>
{shouldDisplayAppNavBar && <AppNavBar />}
<div className='mx-auto max-w-7xl sm:px-6 lg:px-8'>
<div className='mx-auto max-w-7xl sm:px-6 lg:px-8 w-full'>
{isError ? (
children
) : isLoading ? (
Expand All @@ -133,7 +135,15 @@ export default function App({ children }: { children: ReactNode }) {
))
)}
</div>
</>
<div>
<Footer />
<div className='flex items-center h-20 '>
<p className='text-center w-full text-sm text-captn-dark-blue opacity-50'>
© 2024 airt. All rights reserved.
</p>
</div>
</div>
</div>
)}
</div>
</>
Expand Down
35 changes: 35 additions & 0 deletions app/src/client/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { footerNavigation } from '../landing-page/contentSections';

const Footer = () => {
return (
<div>
<footer
aria-labelledby='footer-heading'
className='relative mt-5 border-t border-gray-900/10'
>
<div className='flex items-start justify-end mt-10 gap-20 mx-auto max-w-7xl sm:px-6 lg:px-8'>
<div>
<h3 className='text-sm font-semibold leading-6 text-captn-dark-blue dark:text-captn-light-cream'>
Company
</h3>
<ul role='list' className='mt-6 space-y-4'>
{footerNavigation.company.map((item) => (
<li key={item.name}>
<a
href={item.href}
className='text-sm leading-6 text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream'
target={`${item.name === 'airt' ? '_blank' : '_self'}`}
>
{item.name}
</a>
</li>
))}
</ul>
</div>
</div>
</footer>
</div>
);
};

export default Footer;
41 changes: 3 additions & 38 deletions app/src/client/landing-page/LandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from './contentSections';
import DropdownUser from '../components/DropdownUser';
import { UserMenuItems } from '../components/UserMenuItems';
import FreeTrialButton from '../components/FreeTrialButton';
import Footer from '../components/Footer';
import UserActionButton from '../components/UserActionButton';

export default function LandingPage() {
Expand Down Expand Up @@ -389,7 +389,7 @@ export default function LandingPage() {
</main>

{/* Footer */}
<div className='mx-auto mt-6 max-w-7xl px-6 lg:px-8 dark:bg-boxdark-2'>
{/* <div className='mx-auto mt-6 max-w-7xl px-6 lg:px-8 dark:bg-boxdark-2'>
<footer
aria-labelledby='footer-heading'
className='relative border-t border-gray-900/10 dark:border-gray-200/10 py-5 sm:mt-5'
Expand All @@ -398,44 +398,9 @@ export default function LandingPage() {
Footer
</h2>
<div className='flex items-start justify-end mt-10 gap-20'>
{/* <div>
<h3 className='text-sm font-semibold leading-6 text-captn-dark-blue dark:text-captn-light-cream'>
App
</h3>
<ul role='list' className='mt-6 space-y-4'>
{footerNavigation.app.map((item) => (
<li key={item.name}>
<a
href={item.href}
className='text-sm leading-6 text-captn-dark-blue hover:text-captn-dark-blue dark:text-captn-light-cream'
>
{item.name}
</a>
</li>
))}
</ul>
</div> */}
<div>
<h3 className='text-sm font-semibold leading-6 text-captn-dark-blue dark:text-captn-light-cream'>
Company
</h3>
<ul role='list' className='mt-6 space-y-4'>
{footerNavigation.company.map((item) => (
<li key={item.name}>
<a
href={item.href}
className='text-sm leading-6 text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream'
target={`${item.name === 'About' ? '_blank' : '_self'}`}
>
{item.name}
</a>
</li>
))}
</ul>
</div>
</div>
</footer>
</div>
</div> */}
</div>
);
}
6 changes: 3 additions & 3 deletions app/src/client/landing-page/contentSections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ export const footerNavigation = {
{ name: 'Blog', href: BLOG_URL },
],
company: [
{ name: 'About', href: 'https://airt.ai/' },
{ name: 'Privacy', href: 'https://captn.ai/privacy' },
{ name: 'Terms of Service', href: 'https://captn.ai/toc' },
{ name: 'airt', href: 'https://airt.ai/' },
{ name: 'Privacy', href: '/privacy' },
{ name: 'Terms of Service', href: '/toc' },
],
};

0 comments on commit 8a4d039

Please sign in to comment.