diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..7a5bb350d --- /dev/null +++ b/.gitignore @@ -0,0 +1,32 @@ +# .NET +bin/ +obj/ +*.user +*.suo +.vs/ +publish/ + +# Node / Angular +node_modules/ +apps/angular/node_modules/ +apps/react/node_modules/ +dist/ +.angular/ +ClientApp/dist/ +ClientApp/coverage/ +ClientApp/.storybook-out/ + +# Logs +*.log +npm-debug.log* + +# OS +.DS_Store +Thumbs.db + +# Env / secrets +*.env +appsettings.Development.json + +# wwwroot build output (keep static assets, ignore generated JS) +wwwroot/dist/ diff --git a/apps/react/src/app/components/page-tabs/index.ts b/apps/react/src/app/components/page-tabs/index.ts new file mode 100644 index 000000000..d4c3cdc71 --- /dev/null +++ b/apps/react/src/app/components/page-tabs/index.ts @@ -0,0 +1 @@ +export { PageTabs } from './page-tabs' diff --git a/apps/react/src/app/components/page-tabs/page-tabs.scss b/apps/react/src/app/components/page-tabs/page-tabs.scss new file mode 100644 index 000000000..e13dfb4a0 --- /dev/null +++ b/apps/react/src/app/components/page-tabs/page-tabs.scss @@ -0,0 +1,25 @@ +.page-tabs { + display: flex; + gap: 10px; + border-bottom: 2px solid #e0e0e0; + margin-bottom: 20px; +} + +.page-tabs__link { + padding: 12px 16px; + text-decoration: none; + color: #666; + font-weight: 500; + border-bottom: 3px solid transparent; + cursor: pointer; + transition: all 0.2s ease; + + &:hover { + color: #333; + } + + &--active { + color: #1976d2; + border-bottom-color: #1976d2; + } +} diff --git a/apps/react/src/app/components/page-tabs/page-tabs.tsx b/apps/react/src/app/components/page-tabs/page-tabs.tsx new file mode 100644 index 000000000..505b91202 --- /dev/null +++ b/apps/react/src/app/components/page-tabs/page-tabs.tsx @@ -0,0 +1,32 @@ +import React from 'react' +import { Link, useLocation } from 'react-router-dom' +import { useTranslation } from 'react-i18next' +import './page-tabs.scss' + +export const PageTabs: React.FC = () => { + const location = useLocation() + const { t } = useTranslation() + + const tabs = [ + { path: '/onlineboard', label: 'SHARED.ONLINE_BOARD', testId: 'onlineboard-tab' }, + { path: '/schedule', label: 'SHARED.SCHEDULE', testId: 'schedule-tab' }, + { path: '/flights-map', label: 'SHARED.FLIGHTS_MAP', testId: 'flights-map-tab' }, + ] + + const isActive = (path: string) => location.pathname.startsWith(path) + + return ( + + ) +}