From 52d16a88d4a79de759d3850be3567596e4582501 Mon Sep 17 00:00:00 2001 From: Bastien Grignon Date: Wed, 21 Aug 2024 23:50:19 +0200 Subject: [PATCH 1/2] WIP refactor texts --- src/components/Admin/Dashboard/index.tsx | 5 +- .../DashboardPageAssociation/index.tsx | 7 +++ .../DashboardPageHome/index.tsx | 7 +++ .../DashboardPageInformation/index.tsx | 5 ++ .../DashboardPageProgrammation/index.tsx | 5 ++ src/components/Admin/DashboardPages/index.tsx | 39 +++++++++++++++ src/components/Footer/index.tsx | 6 +-- src/pages/admin/Navigation/index.tsx | 46 +++-------------- .../admin/Navigation/useNavigation.hook.ts | 50 +++++++++++++++++++ 9 files changed, 125 insertions(+), 45 deletions(-) create mode 100644 src/components/Admin/DashboardPages/DashboardPageAssociation/index.tsx create mode 100644 src/components/Admin/DashboardPages/DashboardPageHome/index.tsx create mode 100644 src/components/Admin/DashboardPages/DashboardPageInformation/index.tsx create mode 100644 src/components/Admin/DashboardPages/DashboardPageProgrammation/index.tsx create mode 100644 src/components/Admin/DashboardPages/index.tsx create mode 100644 src/pages/admin/Navigation/useNavigation.hook.ts diff --git a/src/components/Admin/Dashboard/index.tsx b/src/components/Admin/Dashboard/index.tsx index d399e4a..08c9ffa 100644 --- a/src/components/Admin/Dashboard/index.tsx +++ b/src/components/Admin/Dashboard/index.tsx @@ -23,7 +23,7 @@ import { DASHBOARD_TITLE_GPS_COORDS, DASHBOARD_TITLE_INFORMATION, } from './Dashboard.constants'; -import DashboardText from '../DashboardText'; +import DashboardPages from '../DashboardPages'; const Navigation = loadable(() => import('../../../pages/admin/Navigation')); const { RangePicker } = DatePicker; @@ -121,7 +121,8 @@ const Dashboard: React.FC = () => {
- + + {/**/}
diff --git a/src/components/Admin/DashboardPages/DashboardPageAssociation/index.tsx b/src/components/Admin/DashboardPages/DashboardPageAssociation/index.tsx new file mode 100644 index 0000000..4ca6b1c --- /dev/null +++ b/src/components/Admin/DashboardPages/DashboardPageAssociation/index.tsx @@ -0,0 +1,7 @@ +import React from 'react'; + +const DashboardPageAssociation : React.FC = () => ( +
Association
+); + +export default DashboardPageAssociation; diff --git a/src/components/Admin/DashboardPages/DashboardPageHome/index.tsx b/src/components/Admin/DashboardPages/DashboardPageHome/index.tsx new file mode 100644 index 0000000..f9b8e45 --- /dev/null +++ b/src/components/Admin/DashboardPages/DashboardPageHome/index.tsx @@ -0,0 +1,7 @@ +import React from 'react'; + +const DashboardPageHome: React.FC = () => ( +
Accueil
+); + +export default DashboardPageHome; diff --git a/src/components/Admin/DashboardPages/DashboardPageInformation/index.tsx b/src/components/Admin/DashboardPages/DashboardPageInformation/index.tsx new file mode 100644 index 0000000..b7cfd21 --- /dev/null +++ b/src/components/Admin/DashboardPages/DashboardPageInformation/index.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +const DashboardPageInformation: React.FC = () => (
Information
); + +export default DashboardPageInformation; diff --git a/src/components/Admin/DashboardPages/DashboardPageProgrammation/index.tsx b/src/components/Admin/DashboardPages/DashboardPageProgrammation/index.tsx new file mode 100644 index 0000000..8e88e12 --- /dev/null +++ b/src/components/Admin/DashboardPages/DashboardPageProgrammation/index.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +const DashboardPageProgrammation: React.FC = () => (
Programmation
); + +export default DashboardPageProgrammation; diff --git a/src/components/Admin/DashboardPages/index.tsx b/src/components/Admin/DashboardPages/index.tsx new file mode 100644 index 0000000..274312c --- /dev/null +++ b/src/components/Admin/DashboardPages/index.tsx @@ -0,0 +1,39 @@ +import React from 'react'; +import { Tabs, TabsProps } from 'antd'; +import { ApartmentOutlined, AppstoreFilled, HomeFilled, InfoCircleFilled } from '@ant-design/icons'; +import DashboardPageHome from './DashboardPageHome'; +import DashboardPageAssociation from './DashboardPageAssociation'; +import DashboardPageProgrammation from './DashboardPageProgrammation'; +import DashboardPageInformation from './DashboardPageInformation'; + +const DashboardPages: React.FC = () => { + const pages: TabsProps['items'] = [ + { + key: '1', + label: 'Accueil', + icon: , + children: + }, + { + key: '2', + label: 'Association', + icon: , + children: + }, + { + key: '3', + label: 'Programmation', + icon: , + children: + }, + { + key: '4', + label: 'Information', + icon: , + children: + } + ]; + return (); +}; + +export default DashboardPages; diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx index b961e95..56160c6 100644 --- a/src/components/Footer/index.tsx +++ b/src/components/Footer/index.tsx @@ -30,13 +30,13 @@ const Footer: React.FC = () => { }); return ( -