import React, { useEffect, useState } from 'react' import ThemeImage from '@/components/ThemeImage' import { AiOutlineGithub } from 'react-icons/ai' import { RiTwitterXFill } from 'react-icons/ri' import { BiLogoDiscordAlt } from 'react-icons/bi' import { useForm } from 'react-hook-form' import LogoMark from '@/components/LogoMark' import { FaLinkedin } from 'react-icons/fa' import posthog from 'posthog-js' const socials = [ { icon: ( ), href: 'https://twitter.com/jandotai', }, { icon: ( ), href: 'https://discord.com/invite/FTk2MvZwJH', }, { icon: ( ), href: 'https://github.com/janhq/jan', }, { icon: , href: 'https://www.linkedin.com/company/homebrewltd', }, ] const menus = [ { name: 'Product', child: [ { menu: 'Download', path: '/download', }, { menu: 'Changelog', path: '/changelog', }, ], }, { name: 'For Developers', child: [ { menu: 'Documentation', path: '/docs', }, ], }, { name: 'Community', child: [ { menu: 'Github', path: 'https://github.com/janhq/jan', external: true, }, { menu: 'Discord', path: 'https://discord.gg/FTk2MvZwJH', external: true, }, { menu: 'Twitter', path: 'https://twitter.com/jandotai', external: true, }, { menu: 'LinkedIn', path: 'https://www.linkedin.com/company/homebrewltd', external: true, }, ], }, { name: 'Company', child: [ { menu: 'About', path: '/about', }, { menu: 'Blog', path: '/blog', }, { menu: 'Careers', path: 'https://homebrew.bamboohr.com/careers', external: true, }, ], }, ] const getCurrentYear = new Date().getFullYear() export default function Footer() { useEffect(() => { if (typeof window !== 'undefined') { posthog.init(process.env.POSTHOG_KEY as string, { api_host: process.env.POSTHOG_HOST, disable_session_recording: true, person_profiles: 'always', persistence: 'localStorage', }) posthog.capture('web_page_view', { timestamp: new Date() }) } }, []) const { register, handleSubmit, reset } = useForm({ defaultValues: { email: '', }, }) const [formMessage, setFormMessage] = useState('') const onSubmit = (data: { email: string }) => { const { email } = data const options = { method: 'POST', body: JSON.stringify({ updateEnabled: false, email, listIds: [13], }), } if (email) { fetch('https://brevo.jan.ai/', options) .then((response) => response.json()) .then((response) => { if (response.id) { setFormMessage('You have successfully joined our newsletter') } else { setFormMessage(response.message) } reset() setTimeout(() => { setFormMessage('') }, 5000) }) .catch((err) => console.error(err)) } } return (

Jan

The Soul of a New Machine

Subscribe to our newsletter on AI 
research and building Jan:

{formMessage &&

{formMessage}

}
{menus.map((menu, i) => { return (

{menu.name}

) })}
{socials.map((social, i) => { return ( {social.icon} ) })}
©{getCurrentYear} Homebrew Computer Company
) }