Skip to content

Commit

Permalink
fix: solve types problem
Browse files Browse the repository at this point in the history
  • Loading branch information
shootermv committed Oct 28, 2023
1 parent f5009f5 commit d02fd4e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
BarChartOutlined,
LineChartOutlined,
} from '@ant-design/icons'
import { MenuPage } from './pages/components/header/menu/Menu'
const { Content } = Layout

const StyledLayout = styled(Layout)`
Expand Down Expand Up @@ -103,7 +104,7 @@ const PAGES = [
key: 'https://www.jgive.com/new/he/ils/donation-targets/3268#donation-modal',
icon: DollarOutlined,
},
]
] as MenuPage[]

const theme = createTheme(
{
Expand Down
1 change: 0 additions & 1 deletion src/locale/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"timeline_page_title": "לוח זמנים היסטורי",
"realtime_map_page_title": "מפה בזמן אמת",
"gaps_page_title": "נסיעות שלא יצאו",
"gaps_patterns_page_title": "דפוסי נסיעות שלא יצאו",
"singleline_map_page_title": "מפה לפי קו",
"choose_datetime": "תאריך ושעה",
"choose_date": "תאריך",
Expand Down
6 changes: 4 additions & 2 deletions src/pages/components/header/menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import { useLocation, useNavigate } from 'react-router-dom'
import cn from 'classnames'
import './menu.scss'
import { useTranslation } from 'react-i18next'
import { IconBaseProps } from '@ant-design/icons/lib/components/Icon'

export type MenuPage = {
label: string
key: string
icon: string
searchParamsRequired?: boolean
icon: string | React.FunctionComponent<IconBaseProps>
}

function Menu({ pages }: { pages: MenuPage[] }) {
Expand Down Expand Up @@ -41,7 +43,7 @@ function Menu({ pages }: { pages: MenuPage[] }) {
}}
/>
}
{page.label}
{t(page.label)}
</li>
))}
{null && <button onClick={handleChangeLanguage}>Change Language</button>}
Expand Down

0 comments on commit d02fd4e

Please sign in to comment.