Skip to content

Commit

Permalink
fix: add back social icon
Browse files Browse the repository at this point in the history
  • Loading branch information
urmauur committed May 30, 2024
1 parent 2f0ab40 commit 1c1c6af
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions web/containers/Layout/BottomPanel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Button, Tooltip } from '@janhq/joi'
import { useAtomValue } from 'jotai'

import { FaGithub, FaDiscord } from 'react-icons/fa'
import { twMerge } from 'tailwind-merge'

import DownloadingState from './DownloadingState'
Expand All @@ -13,6 +15,19 @@ import UpdatedFailedModal from './UpdateFailedModal'
import { appDownloadProgressAtom } from '@/helpers/atoms/App.atom'
import { reduceTransparentAtom } from '@/helpers/atoms/Setting.atom'

const menuLinks = [
{
name: 'Discord',
icon: <FaDiscord size={16} className="flex-shrink-0" />,
link: 'https://discord.gg/FTk2MvZwJH',
},
{
name: 'Github',
icon: <FaGithub size={14} className="flex-shrink-0" />,
link: 'https://github.com/janhq/jan',
},
]

const BottomPanel = () => {
const progress = useAtomValue(appDownloadProgressAtom)
const reduceTransparent = useAtomValue(reduceTransparentAtom)
Expand Down Expand Up @@ -41,6 +56,31 @@ const BottomPanel = () => {
<span className="font-medium text-[hsla(var(--text-secondary))]">
Jan v{VERSION ?? ''}
</span>
<div className="ml-2 flex items-center">
{menuLinks
.filter((link) => !!link)
.map((link, i) => (
<div className="relative" key={i}>
<Tooltip
withArrow={false}
side="top"
trigger={
<Button theme="icon">
<a
href={link.link}
target="_blank"
rel="noopener noreferrer"
className="relative flex w-full flex-shrink-0 items-center justify-center no-underline"
>
{link.icon}
</a>
</Button>
}
content={link.name}
/>
</div>
))}
</div>
</div>
</div>
)
Expand Down

0 comments on commit 1c1c6af

Please sign in to comment.