Skip to content

Commit

Permalink
✨ Add more links to photogallery
Browse files Browse the repository at this point in the history
  • Loading branch information
harastaivan committed Jul 11, 2024
1 parent 2ac7e7c commit f6a3427
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/containers/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Container, Button, Row, Col } from 'reactstrap'

import Sponsors from 'components/Sponsors'
import { APP_TITLE, SIGNUP_DISABLED } from 'config/constants'
import { Footer } from 'modules/ui'
import { Footer, Photogallery } from 'modules/ui'

import News from './News'

Expand All @@ -24,10 +24,8 @@ const Home = () => {
{t('homepage.subheader.2')}.
</h2>
<div className="button-container">
<Button outline color="secondary" size="lg" tag={'a'} href="https://lipty.rajce.idnes.cz">
{t('homepage.photos')}
</Button>{' '}
<Button color="primary" size="lg" tag={NavLink} to="/igc">
<Photogallery />
<Button color="secondary" size="lg" tag={NavLink} to="/igc">
{t('homepage.sendIgc')}
</Button>
</div>
Expand Down
34 changes: 34 additions & 0 deletions src/modules/ui/components/Photogallery/Photogallery.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Dropdown, DropdownItem, DropdownMenu, DropdownToggle } from 'reactstrap'

export const Photogallery = () => {
const { t } = useTranslation()
const [dropdownOpen, setDropdownOpen] = useState(false)

const toggle = () => setDropdownOpen((prevState) => !prevState)
return (
<Dropdown
isOpen={dropdownOpen}
toggle={toggle}
direction="down"
style={{ display: 'inline-block', margin: '0.5rem' }}>
<DropdownToggle caret size="lg" color="primary">
{t('homepage.photos')}
</DropdownToggle>
<DropdownMenu>
<DropdownItem header>tcup 2024</DropdownItem>
<DropdownItem href="https://eu.zonerama.com/eraa/Album/11735429" target="_blank">
Grid
</DropdownItem>
<DropdownItem href="https://eu.zonerama.com/eraa/Album/11720304" target="_blank">
6. - 8. 7. 2024
</DropdownItem>
<DropdownItem divider />
<DropdownItem href="https://lipty.rajce.idnes.cz" target="_blank">
tcup 2022-2018
</DropdownItem>
</DropdownMenu>
</Dropdown>
)
}
1 change: 1 addition & 0 deletions src/modules/ui/components/Photogallery/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './Photogallery';
1 change: 1 addition & 0 deletions src/modules/ui/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './Footer'
export * from './Spinner'
export * from './SpinnerFullPage'
export * from './Photogallery'

0 comments on commit f6a3427

Please sign in to comment.