From 0dfc4b327004e687119d4ad2d702b636ef107a3c Mon Sep 17 00:00:00 2001 From: Kelvin Kiptum Kiprop Date: Wed, 3 Apr 2024 21:53:39 +0300 Subject: [PATCH] chore: cleaned up imports and refactors --- package.json | 2 +- src/App.tsx | 54 +----- src/components/BackBtn/BackBtn.tsx | 4 +- src/components/Card/Card.tsx | 4 +- src/components/ContactForm/ContactForm.tsx | 4 +- src/components/Container/Container.tsx | 4 +- src/components/Container/index.ts | 2 +- src/components/EmployeeCard/EmployeeCard.tsx | 4 +- src/components/FaqCollapse/FaqCollapse.tsx | 4 +- src/components/Flex/Flex.tsx | 4 +- src/components/Loader/Loader.tsx | 4 +- src/components/Logo/Logo.tsx | 4 +- src/components/MoreMenu/MoreMenu.tsx | 4 +- .../NotificationsCard/NotificationsCard.tsx | 9 +- .../NotificationsItem/NotificationsItem.tsx | 4 +- src/components/Nprogress/Bar.tsx | 4 +- src/components/Nprogress/Container.tsx | 8 +- src/components/Nprogress/Progress.tsx | 14 +- src/components/Nprogress/Spinner.tsx | 4 +- src/components/Nprogress/index.ts | 10 +- src/components/PageHeader/PageHeader.tsx | 4 +- src/components/PricingTable/PricingTable.tsx | 4 +- src/components/RefreshBtn/RefreshBtn.tsx | 4 +- src/components/SitemapCard/SitemapCard.tsx | 4 +- .../SocialMediaCard/SocialMediaCard.tsx | 4 +- src/components/TimelineCard/TimelineCard.tsx | 4 +- src/components/UserAvatar/UserAvatar.tsx | 4 +- .../corporate/BlogsListCard/BlogsListCard.tsx | 4 +- .../AuctionCarousel/AuctionCarousel.tsx | 4 +- .../bidding/CategoriesCard/CategoriesCard.tsx | 4 +- .../bidding/CreatorsCard/CreatorsCard.tsx | 4 +- .../bidding/TopItemsCard/TopItems.tsx | 4 +- .../TransactionsCard/TransactionsCard.tsx | 9 +- src/components/dashboard/bidding/index.ts | 18 +- .../default/CampaignsCard/CampaignsCard.tsx | 4 +- .../default/EarningsCard/EarningsCard.tsx | 4 +- .../default/GetStartedCard/GetStartedCard.tsx | 4 +- .../LatestOrdersCard/LatestOrdersCard.tsx | 9 +- .../default/OrdersChart/OrdersChart.tsx | 4 +- .../RecentUsersCard/RecentUsersCard.tsx | 4 +- .../SubscribersChart/SubscribersChart.tsx | 4 +- .../default/TasksChartCard/TasksChartCard.tsx | 4 +- .../default/TasksListCard/TasksListCard.tsx | 4 +- .../WeeklyActivityCard/WeeklyActivityCard.tsx | 4 +- src/components/dashboard/default/index.ts | 33 ++-- .../CustomerReviewsCard.tsx | 4 +- src/components/dashboard/ecommerce/index.ts | 4 +- src/components/dashboard/index.ts | 68 +------- .../CommunityGroupCard.tsx | 9 +- .../learning/CoursesCard/CoursesCard.tsx | 4 +- .../CoursesCarousel/CoursesCarousel.tsx | 4 +- .../learning/ExamsCard/ExamsCard.tsx | 4 +- .../learning/ProgressCard/ProgressCard.tsx | 4 +- .../learning/StatsCard/StatsCard.tsx | 4 +- .../StudyStatisticsCard.tsx | 9 +- src/components/dashboard/learning/index.ts | 24 +-- .../logistics/DailyPlanCard/DailyPlanCard.tsx | 4 +- .../DeliveryAnalyticsCard.tsx | 9 +- .../DeliveryRequestCard.tsx | 4 +- .../DeliveryTableCard/DeliveryTableCard.tsx | 9 +- .../logistics/StatsCard/StatsCard.tsx | 4 +- .../TrucksListCard/TruckListCard.tsx | 4 +- src/components/dashboard/logistics/index.ts | 21 +-- .../AudienceLocationChart.tsx | 4 +- .../CampaignsActivity/CampaignsActivity.tsx | 4 +- .../CampaignsAdsCard/CampaignsAdsCard.tsx | 6 +- .../SocialStatsCard/SocialStatsCard.tsx | 4 +- .../marketing/StatsCard/StatsCard.tsx | 4 +- .../VisitorsChartCard/VisitorsChartCard.tsx | 4 +- src/components/dashboard/marketing/index.ts | 21 +-- .../projects/ClientsTable/ClientsTable.tsx | 4 +- .../ProjectsCountCard/ProjectsCountCard.tsx | 4 +- .../projects/ProjectsTables/ProjectsTable.tsx | 4 +- src/components/dashboard/projects/index.ts | 8 +- .../dashboard/shared/PostsCard/PostsCard.tsx | 4 +- .../shared/ProjectsCard/ProjectsCard.tsx | 4 +- .../shared/RevenueCard/RevenueCard.tsx | 4 +- src/components/dashboard/shared/index.ts | 8 +- .../social/CommentsCard/CommentsCard.tsx | 4 +- .../DevicesCardChart/DevicesCardChart.tsx | 4 +- .../social/FollowersChart/FollowersChart.tsx | 4 +- .../social/LikesChart/LikesChart.tsx | 4 +- .../social/MilestonesCard/MilestonesCard.tsx | 4 +- .../SocialStatsCard/SocialStatsCard.tsx | 4 +- src/components/dashboard/social/index.ts | 21 +-- src/components/index.ts | 165 +++--------------- src/layouts/app/App.tsx | 8 +- src/layouts/app/index.ts | 4 +- src/layouts/corporate/index.tsx | 4 +- src/layouts/dashboards/index.tsx | 4 +- src/layouts/guest/Guest.tsx | 8 +- src/layouts/index.ts | 18 +- src/layouts/userAccount/index.tsx | 6 +- 93 files changed, 218 insertions(+), 628 deletions(-) diff --git a/package.json b/package.json index 53d76d7..1a7346b 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "dependencies": { "@ant-design/charts": "^1.4.2", "@ant-design/colors": "^7.0.2", - "@ant-design/icons": "^5.2.6", + "@ant-design/icons": "^5.3.0", "@changesets/cli": "^2.26.2", "@tanem/react-nprogress": "^5.0.51", "antd": "^5.10.1", diff --git a/src/App.tsx b/src/App.tsx index 4638aa8..b751ddd 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,17 +1,11 @@ import { RouterProvider } from 'react-router-dom'; -import { Alert, ConfigProvider } from 'antd'; +import { ConfigProvider } from 'antd'; import { HelmetProvider } from 'react-helmet-async'; -import Marquee from 'react-fast-marquee'; import { StylesContext } from './context'; import routes from './routes/routes.tsx'; -import { useEffect, useState } from 'react'; -import { getToken, onMessage } from 'firebase/messaging'; -import { messaging } from './firebase/firebaseConfig.ts'; import './App.css'; -const { VITE_APP_VAPID_KEY } = import.meta.env; - // color palettes: triadic #A1A7CB, #CBA1A7, #A7CBA1 // 10 color objects of primary #2378c3 as generated by https://smart-swatch.netlify.app/#2378c3 // This is for reference purposes @@ -31,39 +25,6 @@ export const COLOR = { }; function App() { - const [showBanner, setShowBanner] = useState(false); - const [bannerMessage, setBannerMessage] = useState< - { image?: string; title?: string; body?: string } | undefined - >(); - - async function requestPermission() { - //requesting permission using Notification API - const permission = await Notification.requestPermission(); - - if (permission === 'granted') { - const token = await getToken(messaging, { - vapidKey: VITE_APP_VAPID_KEY, - }); - - //We can send token to server - console.log('Token generated : ', token); - } else if (permission === 'denied') { - //notifications are blocked - alert('You denied for the notification'); - } - } - - onMessage(messaging, (payload) => { - setShowBanner(true); - setBannerMessage(payload.notification); - }); - - useEffect(() => { - requestPermission(); - }, []); - - console.log(showBanner); - return ( - {showBanner && ( - - {bannerMessage?.title}:    - {bannerMessage?.body} - - } - type="info" - showIcon - banner - /> - )} diff --git a/src/components/BackBtn/BackBtn.tsx b/src/components/BackBtn/BackBtn.tsx index 2127df0..0f5308c 100644 --- a/src/components/BackBtn/BackBtn.tsx +++ b/src/components/BackBtn/BackBtn.tsx @@ -7,7 +7,7 @@ type Props = { iconOnly?: boolean; } & ButtonProps; -const BackBtn = ({ wIcon, iconOnly, ...others }: Props) => { +export const BackBtn = ({ wIcon, iconOnly, ...others }: Props) => { const navigate = useNavigate(); return ( @@ -22,5 +22,3 @@ const BackBtn = ({ wIcon, iconOnly, ...others }: Props) => { ); }; - -export default BackBtn; diff --git a/src/components/Card/Card.tsx b/src/components/Card/Card.tsx index 6ab9c59..40c9ebe 100644 --- a/src/components/Card/Card.tsx +++ b/src/components/Card/Card.tsx @@ -5,12 +5,10 @@ import './styles.css'; type Props = { children: ReactNode } & CardProps; -const Card = ({ children, ...others }: Props) => { +export const Card = ({ children, ...others }: Props) => { return ( {children} ); }; - -export default Card; diff --git a/src/components/ContactForm/ContactForm.tsx b/src/components/ContactForm/ContactForm.tsx index 94854c4..aa58751 100644 --- a/src/components/ContactForm/ContactForm.tsx +++ b/src/components/ContactForm/ContactForm.tsx @@ -6,7 +6,7 @@ const { TextArea } = Input; type Props = FormProps; -const ContactForm = ({ ...others }: Props) => { +export const ContactForm = ({ ...others }: Props) => { const stylesContext = useStylesContext(); return ( @@ -39,5 +39,3 @@ const ContactForm = ({ ...others }: Props) => { ); }; - -export default ContactForm; diff --git a/src/components/Container/Container.tsx b/src/components/Container/Container.tsx index 422ae40..f000bd2 100644 --- a/src/components/Container/Container.tsx +++ b/src/components/Container/Container.tsx @@ -12,7 +12,7 @@ type ContainerProps = { style?: CSSProperties; } & HTMLProps; -const Container = ({ children, style, ...others }: ContainerProps) => { +export const Container = ({ children, style, ...others }: ContainerProps) => { const [containerWidth, setContainerWidth] = useState(); const isMedium = useMediaQuery({ minWidth: 769 }), isLarge = useMediaQuery({ minWidth: 992 }), @@ -47,5 +47,3 @@ const Container = ({ children, style, ...others }: ContainerProps) => { ); }; - -export default Container; diff --git a/src/components/Container/index.ts b/src/components/Container/index.ts index 3ad9279..a93341f 100644 --- a/src/components/Container/index.ts +++ b/src/components/Container/index.ts @@ -1 +1 @@ -export { default } from './Container.tsx'; +export { Container } from './Container.tsx'; diff --git a/src/components/EmployeeCard/EmployeeCard.tsx b/src/components/EmployeeCard/EmployeeCard.tsx index 1ded4e1..d507650 100644 --- a/src/components/EmployeeCard/EmployeeCard.tsx +++ b/src/components/EmployeeCard/EmployeeCard.tsx @@ -8,7 +8,7 @@ type Props = { showInfo?: boolean; } & CardProps; -const EmployeeCard = ({ data, showInfo, ...others }: Props) => { +export const EmployeeCard = ({ data, showInfo, ...others }: Props) => { const { avatar, first_name, @@ -50,5 +50,3 @@ const EmployeeCard = ({ data, showInfo, ...others }: Props) => { ); }; - -export default EmployeeCard; diff --git a/src/components/FaqCollapse/FaqCollapse.tsx b/src/components/FaqCollapse/FaqCollapse.tsx index 4b893a8..28fe5e6 100644 --- a/src/components/FaqCollapse/FaqCollapse.tsx +++ b/src/components/FaqCollapse/FaqCollapse.tsx @@ -2,8 +2,6 @@ import { Collapse, CollapseProps } from 'antd'; type Props = CollapseProps; -const FaqCollapse = ({ ...others }: Props) => { +export const FaqCollapse = ({ ...others }: Props) => { return ; }; - -export default FaqCollapse; diff --git a/src/components/Flex/Flex.tsx b/src/components/Flex/Flex.tsx index 733ec1f..9525643 100644 --- a/src/components/Flex/Flex.tsx +++ b/src/components/Flex/Flex.tsx @@ -8,7 +8,7 @@ type Props = { children: ReactNode; } & CSSProperties; -const Flex = ({ +export const Flex = ({ flexDirection, alignItems, gap, @@ -39,5 +39,3 @@ const Flex = ({ ); }; - -export default Flex; diff --git a/src/components/Loader/Loader.tsx b/src/components/Loader/Loader.tsx index fe60dbb..07cab31 100644 --- a/src/components/Loader/Loader.tsx +++ b/src/components/Loader/Loader.tsx @@ -2,7 +2,7 @@ import { Spin, theme } from 'antd'; import './styles.css'; -const Loader = () => { +export const Loader = () => { const { token: { borderRadius }, } = theme.useToken(); @@ -15,5 +15,3 @@ const Loader = () => { ); }; - -export default Loader; diff --git a/src/components/Logo/Logo.tsx b/src/components/Logo/Logo.tsx index cae21f2..5b52006 100644 --- a/src/components/Logo/Logo.tsx +++ b/src/components/Logo/Logo.tsx @@ -15,7 +15,7 @@ type LogoProps = { bgColor?: CSSProperties['backgroundColor']; } & Partial; -const Logo = ({ +export const Logo = ({ asLink, color, href, @@ -73,5 +73,3 @@ const Logo = ({ ); }; - -export default Logo; diff --git a/src/components/MoreMenu/MoreMenu.tsx b/src/components/MoreMenu/MoreMenu.tsx index c0f9fa2..b2e356e 100644 --- a/src/components/MoreMenu/MoreMenu.tsx +++ b/src/components/MoreMenu/MoreMenu.tsx @@ -31,7 +31,7 @@ const items: MenuProps['items'] = [ }, ]; -const MoreMenu = () => { +export const MoreMenu = () => { return ( ); }; - -export default RefreshBtn; diff --git a/src/components/SitemapCard/SitemapCard.tsx b/src/components/SitemapCard/SitemapCard.tsx index cd081f9..58a560b 100644 --- a/src/components/SitemapCard/SitemapCard.tsx +++ b/src/components/SitemapCard/SitemapCard.tsx @@ -11,7 +11,7 @@ type Props = { }; } & CardProps; -const SitemapCard = ({ data, ...others }: Props) => { +export const SitemapCard = ({ data, ...others }: Props) => { return ( @@ -29,5 +29,3 @@ const SitemapCard = ({ data, ...others }: Props) => { ); }; - -export default SitemapCard; diff --git a/src/components/SocialMediaCard/SocialMediaCard.tsx b/src/components/SocialMediaCard/SocialMediaCard.tsx index fe4c970..12f286b 100644 --- a/src/components/SocialMediaCard/SocialMediaCard.tsx +++ b/src/components/SocialMediaCard/SocialMediaCard.tsx @@ -17,7 +17,7 @@ const BUTTON_PROPS: ButtonProps = { type Props = CardProps; -const SocialMediaCard = ({ ...others }: Props) => { +export const SocialMediaCard = ({ ...others }: Props) => { return ( @@ -40,5 +40,3 @@ const SocialMediaCard = ({ ...others }: Props) => { ); }; - -export default SocialMediaCard; diff --git a/src/components/TimelineCard/TimelineCard.tsx b/src/components/TimelineCard/TimelineCard.tsx index 06c8712..a010e8a 100644 --- a/src/components/TimelineCard/TimelineCard.tsx +++ b/src/components/TimelineCard/TimelineCard.tsx @@ -14,7 +14,7 @@ type Props = { error?: ReactNode; } & CardProps; -const TimelineCard = ({ data, error, loading, ...others }: Props) => { +export const TimelineCard = ({ data, error, loading, ...others }: Props) => { return ( {error ? ( @@ -60,5 +60,3 @@ const TimelineCard = ({ data, error, loading, ...others }: Props) => { ); }; - -export default TimelineCard; diff --git a/src/components/UserAvatar/UserAvatar.tsx b/src/components/UserAvatar/UserAvatar.tsx index 2e7db02..e1c6937 100644 --- a/src/components/UserAvatar/UserAvatar.tsx +++ b/src/components/UserAvatar/UserAvatar.tsx @@ -16,7 +16,7 @@ type Props = { textWidth?: CSSProperties['width']; } & Omit; -const UserAvatar = ({ +export const UserAvatar = ({ fullName, mark, size, @@ -73,5 +73,3 @@ const UserAvatar = ({ ); }; - -export default UserAvatar; diff --git a/src/components/corporate/BlogsListCard/BlogsListCard.tsx b/src/components/corporate/BlogsListCard/BlogsListCard.tsx index 9a61b56..b2a610b 100644 --- a/src/components/corporate/BlogsListCard/BlogsListCard.tsx +++ b/src/components/corporate/BlogsListCard/BlogsListCard.tsx @@ -14,7 +14,7 @@ const IconText = ({ icon, text }: { icon: React.FC; text: string }) => ( type Props = { data: any; loading?: boolean; error?: ReactNode } & CardProps; -const BlogsListCard = ({ data, loading, error, ...others }: Props) => { +export const BlogsListCard = ({ data, loading, error, ...others }: Props) => { return ( { ); }; - -export default BlogsListCard; diff --git a/src/components/dashboard/bidding/AuctionCarousel/AuctionCarousel.tsx b/src/components/dashboard/bidding/AuctionCarousel/AuctionCarousel.tsx index 510182a..dbc4997 100644 --- a/src/components/dashboard/bidding/AuctionCarousel/AuctionCarousel.tsx +++ b/src/components/dashboard/bidding/AuctionCarousel/AuctionCarousel.tsx @@ -108,7 +108,7 @@ type Props = { error: ReactNode; }; -const AuctionCarousel = ({ data, error, loading }: Props) => { +export const AuctionCarousel = ({ data, error, loading }: Props) => { const settings: CarouselProps = { autoplay: false, dots: true, @@ -163,5 +163,3 @@ const AuctionCarousel = ({ data, error, loading }: Props) => { ); }; - -export default AuctionCarousel; diff --git a/src/components/dashboard/bidding/CategoriesCard/CategoriesCard.tsx b/src/components/dashboard/bidding/CategoriesCard/CategoriesCard.tsx index 4ab8d27..8c56258 100644 --- a/src/components/dashboard/bidding/CategoriesCard/CategoriesCard.tsx +++ b/src/components/dashboard/bidding/CategoriesCard/CategoriesCard.tsx @@ -171,7 +171,7 @@ const CATEGORIES_COLUMNS = [ type Props = CardProps; -const CategoriesCard = ({ ...others }: Props) => { +export const CategoriesCard = ({ ...others }: Props) => { return ( { ); }; - -export default CategoriesCard; diff --git a/src/components/dashboard/bidding/CreatorsCard/CreatorsCard.tsx b/src/components/dashboard/bidding/CreatorsCard/CreatorsCard.tsx index 3ba1e0b..1c45085 100644 --- a/src/components/dashboard/bidding/CreatorsCard/CreatorsCard.tsx +++ b/src/components/dashboard/bidding/CreatorsCard/CreatorsCard.tsx @@ -42,7 +42,7 @@ type Props = { error?: ReactNode; } & CardProps; -const CreatorsCard = ({ data, loading, error, ...others }: Props) => { +export const CreatorsCard = ({ data, loading, error, ...others }: Props) => { return error ? ( { ); }; - -export default CreatorsCard; diff --git a/src/components/dashboard/bidding/TopItemsCard/TopItems.tsx b/src/components/dashboard/bidding/TopItemsCard/TopItems.tsx index 376fda5..9c488ea 100644 --- a/src/components/dashboard/bidding/TopItemsCard/TopItems.tsx +++ b/src/components/dashboard/bidding/TopItemsCard/TopItems.tsx @@ -63,7 +63,7 @@ type Props = { error?: ReactNode; } & CardProps; -const TopItemsCard = ({ data, loading, error, ...others }: Props) => { +export const TopItemsCard = ({ data, loading, error, ...others }: Props) => { return error ? ( { ); }; - -export default TopItemsCard; diff --git a/src/components/dashboard/bidding/TransactionsCard/TransactionsCard.tsx b/src/components/dashboard/bidding/TransactionsCard/TransactionsCard.tsx index 4c0ee1c..91ab6b9 100644 --- a/src/components/dashboard/bidding/TransactionsCard/TransactionsCard.tsx +++ b/src/components/dashboard/bidding/TransactionsCard/TransactionsCard.tsx @@ -69,7 +69,12 @@ type Props = { error?: ReactNode; } & CardProps; -const TransactionsCard = ({ data, loading, error, ...others }: Props) => { +export const TransactionsCard = ({ + data, + loading, + error, + ...others +}: Props) => { return error ? ( { ); }; - -export default TransactionsCard; diff --git a/src/components/dashboard/bidding/index.ts b/src/components/dashboard/bidding/index.ts index 5a57150..cdc2a88 100644 --- a/src/components/dashboard/bidding/index.ts +++ b/src/components/dashboard/bidding/index.ts @@ -1,13 +1,5 @@ -import AuctionCarousel from './AuctionCarousel/AuctionCarousel.tsx'; -import CreatorsCard from './CreatorsCard/CreatorsCard.tsx'; -import TopItemsCard from './TopItemsCard/TopItems.tsx'; -import TransactionsCard from './TransactionsCard/TransactionsCard.tsx'; -import CategoriesCard from './CategoriesCard/CategoriesCard.tsx'; - -export { - AuctionCarousel, - CreatorsCard, - TopItemsCard, - TransactionsCard, - CategoriesCard, -}; +export { AuctionCarousel } from './AuctionCarousel/AuctionCarousel.tsx'; +export { CreatorsCard } from './CreatorsCard/CreatorsCard.tsx'; +export { TopItemsCard } from './TopItemsCard/TopItems.tsx'; +export { TransactionsCard } from './TransactionsCard/TransactionsCard.tsx'; +export { CategoriesCard } from './CategoriesCard/CategoriesCard.tsx'; diff --git a/src/components/dashboard/default/CampaignsCard/CampaignsCard.tsx b/src/components/dashboard/default/CampaignsCard/CampaignsCard.tsx index 00687a8..fd59a25 100644 --- a/src/components/dashboard/default/CampaignsCard/CampaignsCard.tsx +++ b/src/components/dashboard/default/CampaignsCard/CampaignsCard.tsx @@ -98,7 +98,7 @@ const COLUMNS = [ type Props = { data?: any; loading?: boolean; error?: ReactNode } & CardProps; -const CampaignsCard = ({ error, data, loading, ...others }: Props) => { +export const CampaignsCard = ({ error, data, loading, ...others }: Props) => { const { token: { colorPrimary }, } = theme.useToken(); @@ -219,5 +219,3 @@ const CampaignsCard = ({ error, data, loading, ...others }: Props) => { ); }; - -export default CampaignsCard; diff --git a/src/components/dashboard/default/EarningsCard/EarningsCard.tsx b/src/components/dashboard/default/EarningsCard/EarningsCard.tsx index 04a4bbf..f8ad4bb 100644 --- a/src/components/dashboard/default/EarningsCard/EarningsCard.tsx +++ b/src/components/dashboard/default/EarningsCard/EarningsCard.tsx @@ -10,7 +10,7 @@ type Props = { diff: number; } & CardProps; -const EarningsCard = ({ data, title, diff, ...others }: Props) => { +export const EarningsCard = ({ data, title, diff, ...others }: Props) => { const config = { appendPadding: 10, data, @@ -83,5 +83,3 @@ const EarningsCard = ({ data, title, diff, ...others }: Props) => { ); }; - -export default EarningsCard; diff --git a/src/components/dashboard/default/GetStartedCard/GetStartedCard.tsx b/src/components/dashboard/default/GetStartedCard/GetStartedCard.tsx index 1a150e8..0ad56c4 100644 --- a/src/components/dashboard/default/GetStartedCard/GetStartedCard.tsx +++ b/src/components/dashboard/default/GetStartedCard/GetStartedCard.tsx @@ -5,7 +5,7 @@ import CountUp from 'react-countup'; type Props = CardProps; -const GetStartedCard = ({ ...others }: Props) => { +export const GetStartedCard = ({ ...others }: Props) => { return ( @@ -31,5 +31,3 @@ const GetStartedCard = ({ ...others }: Props) => { ); }; - -export default GetStartedCard; diff --git a/src/components/dashboard/default/LatestOrdersCard/LatestOrdersCard.tsx b/src/components/dashboard/default/LatestOrdersCard/LatestOrdersCard.tsx index bbcfaab..86cf339 100644 --- a/src/components/dashboard/default/LatestOrdersCard/LatestOrdersCard.tsx +++ b/src/components/dashboard/default/LatestOrdersCard/LatestOrdersCard.tsx @@ -37,7 +37,12 @@ type Props = { error?: ReactNode; } & CardProps; -const LatestOrdersCard = ({ data, loading, error, ...others }: Props) => { +export const LatestOrdersCard = ({ + data, + loading, + error, + ...others +}: Props) => { const { data: ordersData, loading: ordersDataLoading, @@ -63,5 +68,3 @@ const LatestOrdersCard = ({ data, loading, error, ...others }: Props) => { ); }; - -export default LatestOrdersCard; diff --git a/src/components/dashboard/default/OrdersChart/OrdersChart.tsx b/src/components/dashboard/default/OrdersChart/OrdersChart.tsx index 185c916..bb46c2d 100644 --- a/src/components/dashboard/default/OrdersChart/OrdersChart.tsx +++ b/src/components/dashboard/default/OrdersChart/OrdersChart.tsx @@ -62,12 +62,10 @@ const AreaChart = () => { type Props = CardProps; -const OrdersChart = ({ ...others }: Props) => { +export const OrdersChart = ({ ...others }: Props) => { return ( } {...others}> ); }; - -export default OrdersChart; diff --git a/src/components/dashboard/default/RecentUsersCard/RecentUsersCard.tsx b/src/components/dashboard/default/RecentUsersCard/RecentUsersCard.tsx index a7da4b1..597a3a5 100644 --- a/src/components/dashboard/default/RecentUsersCard/RecentUsersCard.tsx +++ b/src/components/dashboard/default/RecentUsersCard/RecentUsersCard.tsx @@ -33,7 +33,7 @@ const COLUMNS = [ type Props = { data?: any; loading?: boolean; error?: ReactNode } & CardProps; -const RecentUsersCard = ({ data, loading, error, ...others }: Props) => { +export const RecentUsersCard = ({ data, loading, error, ...others }: Props) => { const { data: usersData, loading: usersDataLoading, @@ -59,5 +59,3 @@ const RecentUsersCard = ({ data, loading, error, ...others }: Props) => { ); }; - -export default RecentUsersCard; diff --git a/src/components/dashboard/default/SubscribersChart/SubscribersChart.tsx b/src/components/dashboard/default/SubscribersChart/SubscribersChart.tsx index 8523ee8..7d4c304 100644 --- a/src/components/dashboard/default/SubscribersChart/SubscribersChart.tsx +++ b/src/components/dashboard/default/SubscribersChart/SubscribersChart.tsx @@ -70,7 +70,7 @@ const ColumnChart = () => { return ; }; -const SubscribersChart = ({ ...others }: Props) => { +export const SubscribersChart = ({ ...others }: Props) => { return ( } {...others}> @@ -80,5 +80,3 @@ const SubscribersChart = ({ ...others }: Props) => { ); }; - -export default SubscribersChart; diff --git a/src/components/dashboard/default/TasksChartCard/TasksChartCard.tsx b/src/components/dashboard/default/TasksChartCard/TasksChartCard.tsx index 7cce7ad..9798d92 100644 --- a/src/components/dashboard/default/TasksChartCard/TasksChartCard.tsx +++ b/src/components/dashboard/default/TasksChartCard/TasksChartCard.tsx @@ -50,12 +50,10 @@ type Props = { data?: Tasks[]; } & CardProps; -const TasksChartCard = ({ data, ...others }: Props) => { +export const TasksChartCard = ({ data, ...others }: Props) => { return ( See all} {...others}> ); }; - -export default TasksChartCard; diff --git a/src/components/dashboard/default/TasksListCard/TasksListCard.tsx b/src/components/dashboard/default/TasksListCard/TasksListCard.tsx index 8c5bdd1..8b580b0 100644 --- a/src/components/dashboard/default/TasksListCard/TasksListCard.tsx +++ b/src/components/dashboard/default/TasksListCard/TasksListCard.tsx @@ -22,7 +22,7 @@ type Props = { error?: any; } & CardProps; -const TasksListCard = ({ data, error, loading, ...others }: Props) => { +export const TasksListCard = ({ data, error, loading, ...others }: Props) => { return ( { ); }; - -export default TasksListCard; diff --git a/src/components/dashboard/default/WeeklyActivityCard/WeeklyActivityCard.tsx b/src/components/dashboard/default/WeeklyActivityCard/WeeklyActivityCard.tsx index 9194a99..bd77391 100644 --- a/src/components/dashboard/default/WeeklyActivityCard/WeeklyActivityCard.tsx +++ b/src/components/dashboard/default/WeeklyActivityCard/WeeklyActivityCard.tsx @@ -29,12 +29,10 @@ type Props = { data: Activity[]; } & CardProps; -const WeeklyActivityCard = ({ data, ...others }: Props) => { +export const WeeklyActivityCard = ({ data, ...others }: Props) => { return ( ); }; - -export default WeeklyActivityCard; diff --git a/src/components/dashboard/default/index.ts b/src/components/dashboard/default/index.ts index 11e5ce0..570f04b 100644 --- a/src/components/dashboard/default/index.ts +++ b/src/components/dashboard/default/index.ts @@ -1,23 +1,10 @@ -import CampaignsCard from './CampaignsCard/CampaignsCard.tsx'; -import EarningsCard from './EarningsCard/EarningsCard.tsx'; -import GetStartedCard from './GetStartedCard/GetStartedCard.tsx'; -import LatestOrdersCard from './LatestOrdersCard/LatestOrdersCard.tsx'; -import OrdersChart from './OrdersChart/OrdersChart.tsx'; -import RecentUsersCard from './RecentUsersCard/RecentUsersCard.tsx'; -import SubscribersChart from './SubscribersChart/SubscribersChart.tsx'; -import WeeklyActivityCard from './WeeklyActivityCard/WeeklyActivityCard.tsx'; -import TasksChartCard from './TasksChartCard/TasksChartCard.tsx'; -import TasksListCard from './TasksListCard/TasksListCard.tsx'; - -export { - CampaignsCard, - LatestOrdersCard, - OrdersChart, - RecentUsersCard, - EarningsCard, - GetStartedCard, - SubscribersChart, - WeeklyActivityCard, - TasksChartCard, - TasksListCard, -}; +export { CampaignsCard } from './CampaignsCard/CampaignsCard.tsx'; +export { EarningsCard } from './EarningsCard/EarningsCard.tsx'; +export { GetStartedCard } from './GetStartedCard/GetStartedCard.tsx'; +export { LatestOrdersCard } from './LatestOrdersCard/LatestOrdersCard.tsx'; +export { OrdersChart } from './OrdersChart/OrdersChart.tsx'; +export { RecentUsersCard } from './RecentUsersCard/RecentUsersCard.tsx'; +export { SubscribersChart } from './SubscribersChart/SubscribersChart.tsx'; +export { WeeklyActivityCard } from './WeeklyActivityCard/WeeklyActivityCard.tsx'; +export { TasksChartCard } from './TasksChartCard/TasksChartCard.tsx'; +export { TasksListCard } from './TasksListCard/TasksListCard.tsx'; diff --git a/src/components/dashboard/ecommerce/CustomerReviewsCard/CustomerReviewsCard.tsx b/src/components/dashboard/ecommerce/CustomerReviewsCard/CustomerReviewsCard.tsx index 2ae77ed..d06417a 100644 --- a/src/components/dashboard/ecommerce/CustomerReviewsCard/CustomerReviewsCard.tsx +++ b/src/components/dashboard/ecommerce/CustomerReviewsCard/CustomerReviewsCard.tsx @@ -20,7 +20,7 @@ const PROGRESS_PROPS: ProgressProps = { type Props = CardProps; -const CustomerReviewsCard = ({ ...others }: Props) => { +export const CustomerReviewsCard = ({ ...others }: Props) => { return ( { ); }; - -export default CustomerReviewsCard; diff --git a/src/components/dashboard/ecommerce/index.ts b/src/components/dashboard/ecommerce/index.ts index d467c27..914642a 100644 --- a/src/components/dashboard/ecommerce/index.ts +++ b/src/components/dashboard/ecommerce/index.ts @@ -1,3 +1 @@ -import CustomerReviewsCard from './CustomerReviewsCard/CustomerReviewsCard.tsx'; - -export { CustomerReviewsCard }; +export { CustomerReviewsCard } from './CustomerReviewsCard/CustomerReviewsCard.tsx'; diff --git a/src/components/dashboard/index.ts b/src/components/dashboard/index.ts index 4f89fcc..90abbb7 100644 --- a/src/components/dashboard/index.ts +++ b/src/components/dashboard/index.ts @@ -1,4 +1,4 @@ -import { +export { CampaignsCard, RecentUsersCard, GetStartedCard, @@ -10,10 +10,10 @@ import { TasksChartCard, TasksListCard, } from './default'; -import { RevenueCard, PostsCard, ProjectsCard } from './shared'; -import { CustomerReviewsCard } from './ecommerce'; -import { ProjectsCountCard, ProjectsTable, ClientsTable } from './projects'; -import { +export { RevenueCard, PostsCard, ProjectsCard } from './shared'; +export { CustomerReviewsCard } from './ecommerce'; +export { ProjectsCountCard, ProjectsTable, ClientsTable } from './projects'; +export { StatsCard as MarketingStatsCard, VisitorsChartCard, SocialStatsCard as MarketingSocialStatsCard, @@ -21,7 +21,7 @@ import { CampaignsAdsCard, AudienceLocationChart, } from './marketing'; -import { +export { SocialStatsCard, FollowersChart, LikesChart, @@ -29,14 +29,14 @@ import { MilestonesCard, CommentsCard, } from './social'; -import { +export { AuctionCarousel, CreatorsCard, TopItemsCard, TransactionsCard, CategoriesCard as BiddingCategoriesCard, } from './bidding'; -import { +export { StatsCard as LearningStatsCard, CoursesCard, CoursesCarousel, @@ -45,7 +45,7 @@ import { ExamsCard, CommunityGroupCard, } from './learning'; -import { +export { StatsCard as LogisticsStatsCard, DeliveryTableCard, DeliveryAnalyticsCard, @@ -53,53 +53,3 @@ import { TruckListCard, DeliveryRequestCard, } from './logistics'; - -export { - CampaignsCard, - LatestOrdersCard, - ProjectsCountCard, - RevenueCard, - ProjectsCard, - OrdersChart, - ProjectsTable, - CustomerReviewsCard, - ClientsTable, - EarningsCard, - GetStartedCard, - RecentUsersCard, - SubscribersChart, - MarketingStatsCard, - VisitorsChartCard, - SocialStatsCard, - CampaignsActivity, - CampaignsAdsCard, - AudienceLocationChart, - MarketingSocialStatsCard, - FollowersChart, - LikesChart, - DevicesCardChart, - PostsCard, - MilestonesCard, - CommentsCard, - AuctionCarousel, - CreatorsCard, - TopItemsCard, - TransactionsCard, - BiddingCategoriesCard, - LearningStatsCard, - CoursesCard, - CoursesCarousel, - StudyStatisticsCard, - ProgressCard, - ExamsCard, - CommunityGroupCard, - LogisticsStatsCard, - DeliveryTableCard, - DeliveryAnalyticsCard, - DailyPlanCard, - TruckListCard, - DeliveryRequestCard, - WeeklyActivityCard, - TasksChartCard, - TasksListCard, -}; diff --git a/src/components/dashboard/learning/CommunityGroupsCard/CommunityGroupCard.tsx b/src/components/dashboard/learning/CommunityGroupsCard/CommunityGroupCard.tsx index 9cfcdd9..5c32d00 100644 --- a/src/components/dashboard/learning/CommunityGroupsCard/CommunityGroupCard.tsx +++ b/src/components/dashboard/learning/CommunityGroupsCard/CommunityGroupCard.tsx @@ -12,7 +12,12 @@ type Props = { error?: ReactNode; } & CardProps; -const ExamsCard = ({ data, loading, error, ...others }: Props) => { +export const CommunityGroupCard = ({ + data, + loading, + error, + ...others +}: Props) => { return ( { ); }; - -export default ExamsCard; diff --git a/src/components/dashboard/learning/CoursesCard/CoursesCard.tsx b/src/components/dashboard/learning/CoursesCard/CoursesCard.tsx index 06e752e..2062236 100644 --- a/src/components/dashboard/learning/CoursesCard/CoursesCard.tsx +++ b/src/components/dashboard/learning/CoursesCard/CoursesCard.tsx @@ -64,7 +64,7 @@ type Props = { error?: ReactNode; } & CardProps; -const CoursesCard = ({ data, loading, error, ...others }: Props) => { +export const CoursesCard = ({ data, loading, error, ...others }: Props) => { return ( {error ? ( @@ -85,5 +85,3 @@ const CoursesCard = ({ data, loading, error, ...others }: Props) => { ); }; - -export default CoursesCard; diff --git a/src/components/dashboard/learning/CoursesCarousel/CoursesCarousel.tsx b/src/components/dashboard/learning/CoursesCarousel/CoursesCarousel.tsx index 65e6e36..da3f456 100644 --- a/src/components/dashboard/learning/CoursesCarousel/CoursesCarousel.tsx +++ b/src/components/dashboard/learning/CoursesCarousel/CoursesCarousel.tsx @@ -105,7 +105,7 @@ type Props = { error?: ReactNode; } & CardProps; -const CoursesCarousel = ({ data, loading, error, ...others }: Props) => { +export const CoursesCarousel = ({ data, loading, error, ...others }: Props) => { const sliderRef = useRef(); const isXlScreen = useMediaQuery({ maxWidth: 1200 }); @@ -189,5 +189,3 @@ const CoursesCarousel = ({ data, loading, error, ...others }: Props) => { ); }; - -export default CoursesCarousel; diff --git a/src/components/dashboard/learning/ExamsCard/ExamsCard.tsx b/src/components/dashboard/learning/ExamsCard/ExamsCard.tsx index 5f5d887..711b2c8 100644 --- a/src/components/dashboard/learning/ExamsCard/ExamsCard.tsx +++ b/src/components/dashboard/learning/ExamsCard/ExamsCard.tsx @@ -13,7 +13,7 @@ type Props = { error?: ReactNode; } & CardProps; -const ExamsCard = ({ data, loading, error, ...others }: Props) => { +export const ExamsCard = ({ data, loading, error, ...others }: Props) => { const isLarge = useMediaQuery({ maxWidth: 1024 }); return ( @@ -64,5 +64,3 @@ const ExamsCard = ({ data, loading, error, ...others }: Props) => { ); }; - -export default ExamsCard; diff --git a/src/components/dashboard/learning/ProgressCard/ProgressCard.tsx b/src/components/dashboard/learning/ProgressCard/ProgressCard.tsx index 9ba78ea..bc122e3 100644 --- a/src/components/dashboard/learning/ProgressCard/ProgressCard.tsx +++ b/src/components/dashboard/learning/ProgressCard/ProgressCard.tsx @@ -86,7 +86,7 @@ const items: MenuProps['items'] = [ type Props = CardProps; -const ProgressCard = ({ ...others }: Props) => { +export const ProgressCard = ({ ...others }: Props) => { return ( { ); }; - -export default ProgressCard; diff --git a/src/components/dashboard/learning/StatsCard/StatsCard.tsx b/src/components/dashboard/learning/StatsCard/StatsCard.tsx index d5b0897..982c02b 100644 --- a/src/components/dashboard/learning/StatsCard/StatsCard.tsx +++ b/src/components/dashboard/learning/StatsCard/StatsCard.tsx @@ -11,7 +11,7 @@ type Props = { progress: number; } & CardProps; -const StatsCard = ({ +export const StatsCard = ({ color, icon, title, @@ -34,5 +34,3 @@ const StatsCard = ({ ); }; - -export default StatsCard; diff --git a/src/components/dashboard/learning/StudyStatisticsCard/StudyStatisticsCard.tsx b/src/components/dashboard/learning/StudyStatisticsCard/StudyStatisticsCard.tsx index 5b34ebd..c7e9c06 100644 --- a/src/components/dashboard/learning/StudyStatisticsCard/StudyStatisticsCard.tsx +++ b/src/components/dashboard/learning/StudyStatisticsCard/StudyStatisticsCard.tsx @@ -66,7 +66,12 @@ type Props = { error?: ReactNode; } & CardProps; -const StudyStatisticsCard = ({ data, error, loading, ...others }: Props) => { +export const StudyStatisticsCard = ({ + data, + error, + loading, + ...others +}: Props) => { return ( {error ? ( @@ -84,5 +89,3 @@ const StudyStatisticsCard = ({ data, error, loading, ...others }: Props) => { ); }; - -export default StudyStatisticsCard; diff --git a/src/components/dashboard/learning/index.ts b/src/components/dashboard/learning/index.ts index 7401c5e..602e9bf 100644 --- a/src/components/dashboard/learning/index.ts +++ b/src/components/dashboard/learning/index.ts @@ -1,17 +1,7 @@ -import StatsCard from './StatsCard/StatsCard.tsx'; -import CoursesCard from './CoursesCard/CoursesCard.tsx'; -import CoursesCarousel from './CoursesCarousel/CoursesCarousel.tsx'; -import StudyStatisticsCard from './StudyStatisticsCard/StudyStatisticsCard.tsx'; -import ProgressCard from './ProgressCard/ProgressCard.tsx'; -import ExamsCard from './ExamsCard/ExamsCard.tsx'; -import CommunityGroupCard from './CommunityGroupsCard/CommunityGroupCard.tsx'; - -export { - StatsCard, - CoursesCard, - CoursesCarousel, - StudyStatisticsCard, - ProgressCard, - ExamsCard, - CommunityGroupCard, -}; +export { StatsCard } from './StatsCard/StatsCard.tsx'; +export { CoursesCard } from './CoursesCard/CoursesCard.tsx'; +export { CoursesCarousel } from './CoursesCarousel/CoursesCarousel.tsx'; +export { StudyStatisticsCard } from './StudyStatisticsCard/StudyStatisticsCard.tsx'; +export { ProgressCard } from './ProgressCard/ProgressCard.tsx'; +export { ExamsCard } from './ExamsCard/ExamsCard.tsx'; +export { CommunityGroupCard } from './CommunityGroupsCard/CommunityGroupCard.tsx'; diff --git a/src/components/dashboard/logistics/DailyPlanCard/DailyPlanCard.tsx b/src/components/dashboard/logistics/DailyPlanCard/DailyPlanCard.tsx index 2ff1dfe..0730604 100644 --- a/src/components/dashboard/logistics/DailyPlanCard/DailyPlanCard.tsx +++ b/src/components/dashboard/logistics/DailyPlanCard/DailyPlanCard.tsx @@ -29,12 +29,10 @@ type Props = { data?: Plan[]; } & CardProps; -const DailyPlanCard = ({ data, ...others }: Props) => { +export const DailyPlanCard = ({ data, ...others }: Props) => { return ( ); }; - -export default DailyPlanCard; diff --git a/src/components/dashboard/logistics/DeliveryAnalyticsCard/DeliveryAnalyticsCard.tsx b/src/components/dashboard/logistics/DeliveryAnalyticsCard/DeliveryAnalyticsCard.tsx index 6401e30..b830743 100644 --- a/src/components/dashboard/logistics/DeliveryAnalyticsCard/DeliveryAnalyticsCard.tsx +++ b/src/components/dashboard/logistics/DeliveryAnalyticsCard/DeliveryAnalyticsCard.tsx @@ -84,7 +84,12 @@ type Props = { error?: ReactNode; } & CardProps; -const DeliveryAnalyticsCard = ({ data, loading, error, ...others }: Props) => { +export const DeliveryAnalyticsCard = ({ + data, + loading, + error, + ...others +}: Props) => { return ( {error ? ( @@ -102,5 +107,3 @@ const DeliveryAnalyticsCard = ({ data, loading, error, ...others }: Props) => { ); }; - -export default DeliveryAnalyticsCard; diff --git a/src/components/dashboard/logistics/DeliveryRequestCard/DeliveryRequestCard.tsx b/src/components/dashboard/logistics/DeliveryRequestCard/DeliveryRequestCard.tsx index f84ca48..b8af44c 100644 --- a/src/components/dashboard/logistics/DeliveryRequestCard/DeliveryRequestCard.tsx +++ b/src/components/dashboard/logistics/DeliveryRequestCard/DeliveryRequestCard.tsx @@ -12,7 +12,7 @@ type Props = { error?: ReactNode; } & CardProps; -const DeliveryRequestCard = ({ data, loading, error, ...others }: Props) => { +export const DeliveryRequestCard = ({ data, ...others }: Props) => { return ( { ); }; - -export default DeliveryRequestCard; diff --git a/src/components/dashboard/logistics/DeliveryTableCard/DeliveryTableCard.tsx b/src/components/dashboard/logistics/DeliveryTableCard/DeliveryTableCard.tsx index 761056a..9e39ee9 100644 --- a/src/components/dashboard/logistics/DeliveryTableCard/DeliveryTableCard.tsx +++ b/src/components/dashboard/logistics/DeliveryTableCard/DeliveryTableCard.tsx @@ -93,7 +93,12 @@ type Props = { error?: ReactNode; } & CardProps; -const DeliveryTableCard = ({ data, loading, error, ...others }: Props) => { +export const DeliveryTableCard = ({ + data, + loading, + error, + ...others +}: Props) => { const [activeTabKey, setActiveTabKey] = useState('all'); const onTabChange = (key: string) => { @@ -131,5 +136,3 @@ const DeliveryTableCard = ({ data, loading, error, ...others }: Props) => { ); }; - -export default DeliveryTableCard; diff --git a/src/components/dashboard/logistics/StatsCard/StatsCard.tsx b/src/components/dashboard/logistics/StatsCard/StatsCard.tsx index dbedfb8..81f1ae0 100644 --- a/src/components/dashboard/logistics/StatsCard/StatsCard.tsx +++ b/src/components/dashboard/logistics/StatsCard/StatsCard.tsx @@ -12,7 +12,7 @@ type Props = { icon: any; } & CardProps; -const StatsCard = ({ icon, title, value, diff, ...others }: Props) => { +export const StatsCard = ({ icon, title, value, diff, ...others }: Props) => { return ( @@ -36,5 +36,3 @@ const StatsCard = ({ icon, title, value, diff, ...others }: Props) => { ); }; - -export default StatsCard; diff --git a/src/components/dashboard/logistics/TrucksListCard/TruckListCard.tsx b/src/components/dashboard/logistics/TrucksListCard/TruckListCard.tsx index 1915ed5..ea9759e 100644 --- a/src/components/dashboard/logistics/TrucksListCard/TruckListCard.tsx +++ b/src/components/dashboard/logistics/TrucksListCard/TruckListCard.tsx @@ -22,7 +22,7 @@ type Props = { error?: ReactNode; } & CardProps; -const TruckListCard = ({ data, loading, error, ...others }: Props) => { +export const TruckListCard = ({ data, loading, error, ...others }: Props) => { return ( { ); }; - -export default TruckListCard; diff --git a/src/components/dashboard/logistics/index.ts b/src/components/dashboard/logistics/index.ts index b84e609..7bd3fe2 100644 --- a/src/components/dashboard/logistics/index.ts +++ b/src/components/dashboard/logistics/index.ts @@ -1,15 +1,6 @@ -import StatsCard from './StatsCard/StatsCard.tsx'; -import DeliveryTableCard from './DeliveryTableCard/DeliveryTableCard.tsx'; -import DeliveryAnalyticsCard from './DeliveryAnalyticsCard/DeliveryAnalyticsCard.tsx'; -import DailyPlanCard from './DailyPlanCard/DailyPlanCard.tsx'; -import TruckListCard from './TrucksListCard/TruckListCard.tsx'; -import DeliveryRequestCard from './DeliveryRequestCard/DeliveryRequestCard.tsx'; - -export { - StatsCard, - DeliveryTableCard, - DeliveryAnalyticsCard, - DailyPlanCard, - TruckListCard, - DeliveryRequestCard, -}; +export { StatsCard } from './StatsCard/StatsCard.tsx'; +export { DeliveryTableCard } from './DeliveryTableCard/DeliveryTableCard.tsx'; +export { DeliveryAnalyticsCard } from './DeliveryAnalyticsCard/DeliveryAnalyticsCard.tsx'; +export { DailyPlanCard } from './DailyPlanCard/DailyPlanCard.tsx'; +export { TruckListCard } from './TrucksListCard/TruckListCard.tsx'; +export { DeliveryRequestCard } from './DeliveryRequestCard/DeliveryRequestCard.tsx'; diff --git a/src/components/dashboard/marketing/AudienceLocationChart/AudienceLocationChart.tsx b/src/components/dashboard/marketing/AudienceLocationChart/AudienceLocationChart.tsx index 5c3358e..a82df5a 100644 --- a/src/components/dashboard/marketing/AudienceLocationChart/AudienceLocationChart.tsx +++ b/src/components/dashboard/marketing/AudienceLocationChart/AudienceLocationChart.tsx @@ -149,7 +149,7 @@ const CirclePackingChart = () => { type Props = CardProps; -const AudienceLocationChart = ({ ...others }: Props) => { +export const AudienceLocationChart = ({ ...others }: Props) => { return ( { ); }; - -export default AudienceLocationChart; diff --git a/src/components/dashboard/marketing/CampaignsActivity/CampaignsActivity.tsx b/src/components/dashboard/marketing/CampaignsActivity/CampaignsActivity.tsx index 983bce7..ec6f017 100644 --- a/src/components/dashboard/marketing/CampaignsActivity/CampaignsActivity.tsx +++ b/src/components/dashboard/marketing/CampaignsActivity/CampaignsActivity.tsx @@ -9,7 +9,7 @@ const onPanelChange = (value: Dayjs, mode: CalendarProps['mode']) => { type Props = CardProps; -const CampaignsActivity = ({ ...others }: Props) => { +export const CampaignsActivity = ({ ...others }: Props) => { return ( { ); }; - -export default CampaignsActivity; diff --git a/src/components/dashboard/marketing/CampaignsAdsCard/CampaignsAdsCard.tsx b/src/components/dashboard/marketing/CampaignsAdsCard/CampaignsAdsCard.tsx index 1827dc7..aeaa457 100644 --- a/src/components/dashboard/marketing/CampaignsAdsCard/CampaignsAdsCard.tsx +++ b/src/components/dashboard/marketing/CampaignsAdsCard/CampaignsAdsCard.tsx @@ -129,7 +129,7 @@ const CHILD_TABLE_COLUMNS: TableColumnsType = [ type ExpandedProps = { data: CampaignAds[] }; -const ExpandedRowRender = ({ data }: ExpandedProps) => { +export const ExpandedRowRender = ({ data }: ExpandedProps) => { return (
{ +export const CampaignsAdsCard = ({ error, data, ...others }: Props) => { const [groupedData, setGroupedData] = useState([]); useEffect(() => { @@ -199,5 +199,3 @@ const CampaignsAdsCard = ({ error, data, loading, ...others }: Props) => { ); }; - -export default CampaignsAdsCard; diff --git a/src/components/dashboard/marketing/SocialStatsCard/SocialStatsCard.tsx b/src/components/dashboard/marketing/SocialStatsCard/SocialStatsCard.tsx index ae94f75..f0ff6d3 100644 --- a/src/components/dashboard/marketing/SocialStatsCard/SocialStatsCard.tsx +++ b/src/components/dashboard/marketing/SocialStatsCard/SocialStatsCard.tsx @@ -53,7 +53,7 @@ const SOCIALS_DATA = [ type Props = CardProps; -const SocialStatsCard = ({ ...others }: Props) => ( +export const SocialStatsCard = ({ ...others }: Props) => ( ( /> ); - -export default SocialStatsCard; diff --git a/src/components/dashboard/marketing/StatsCard/StatsCard.tsx b/src/components/dashboard/marketing/StatsCard/StatsCard.tsx index c84a6b2..1d20b12 100644 --- a/src/components/dashboard/marketing/StatsCard/StatsCard.tsx +++ b/src/components/dashboard/marketing/StatsCard/StatsCard.tsx @@ -34,7 +34,7 @@ type Props = { asCurrency?: boolean; } & CardProps; -const StatsCard = ({ +export const StatsCard = ({ data, diff, title, @@ -73,5 +73,3 @@ const StatsCard = ({ ); }; - -export default StatsCard; diff --git a/src/components/dashboard/marketing/VisitorsChartCard/VisitorsChartCard.tsx b/src/components/dashboard/marketing/VisitorsChartCard/VisitorsChartCard.tsx index 207ee6f..6508dcb 100644 --- a/src/components/dashboard/marketing/VisitorsChartCard/VisitorsChartCard.tsx +++ b/src/components/dashboard/marketing/VisitorsChartCard/VisitorsChartCard.tsx @@ -62,7 +62,7 @@ const AreaChart = () => { type Props = CardProps; -const VisitorsChartCard = ({ ...others }: Props) => { +export const VisitorsChartCard = ({ ...others }: Props) => { return ( { ); }; - -export default VisitorsChartCard; diff --git a/src/components/dashboard/marketing/index.ts b/src/components/dashboard/marketing/index.ts index 699afdc..b02b2f2 100644 --- a/src/components/dashboard/marketing/index.ts +++ b/src/components/dashboard/marketing/index.ts @@ -1,15 +1,6 @@ -import StatsCard from './StatsCard/StatsCard.tsx'; -import VisitorsChartCard from './VisitorsChartCard/VisitorsChartCard.tsx'; -import SocialStatsCard from './SocialStatsCard/SocialStatsCard.tsx'; -import CampaignsActivity from './CampaignsActivity/CampaignsActivity.tsx'; -import CampaignsAdsCard from './CampaignsAdsCard/CampaignsAdsCard.tsx'; -import AudienceLocationChart from './AudienceLocationChart/AudienceLocationChart.tsx'; - -export { - StatsCard, - VisitorsChartCard, - SocialStatsCard, - CampaignsActivity, - CampaignsAdsCard, - AudienceLocationChart, -}; +export { StatsCard } from './StatsCard/StatsCard.tsx'; +export { VisitorsChartCard } from './VisitorsChartCard/VisitorsChartCard.tsx'; +export { SocialStatsCard } from './SocialStatsCard/SocialStatsCard.tsx'; +export { CampaignsActivity } from './CampaignsActivity/CampaignsActivity.tsx'; +export { CampaignsAdsCard } from './CampaignsAdsCard/CampaignsAdsCard.tsx'; +export { AudienceLocationChart } from './AudienceLocationChart/AudienceLocationChart.tsx'; diff --git a/src/components/dashboard/projects/ClientsTable/ClientsTable.tsx b/src/components/dashboard/projects/ClientsTable/ClientsTable.tsx index 570c69c..c692ec1 100644 --- a/src/components/dashboard/projects/ClientsTable/ClientsTable.tsx +++ b/src/components/dashboard/projects/ClientsTable/ClientsTable.tsx @@ -23,7 +23,7 @@ type Props = { data: Clients[]; } & TableProps; -const ClientsTable = ({ data, ...others }: Props) => ( +export const ClientsTable = ({ data, ...others }: Props) => (
( {...others} /> ); - -export default ClientsTable; diff --git a/src/components/dashboard/projects/ProjectsCountCard/ProjectsCountCard.tsx b/src/components/dashboard/projects/ProjectsCountCard/ProjectsCountCard.tsx index f26bdbc..bd8de24 100644 --- a/src/components/dashboard/projects/ProjectsCountCard/ProjectsCountCard.tsx +++ b/src/components/dashboard/projects/ProjectsCountCard/ProjectsCountCard.tsx @@ -28,7 +28,7 @@ const SPACE_PROPS: SpaceProps = { type Props = CardProps; -const ProjectsCountCard = ({ ...others }: Props) => { +export const ProjectsCountCard = ({ ...others }: Props) => { const completed = ProjectsData.filter((_) => _.status === 'completed'), inProgress = ProjectsData.filter((_) => _.status === 'in progress'), onHold = ProjectsData.filter((_) => _.status === 'on hold'); @@ -98,5 +98,3 @@ const ProjectsCountCard = ({ ...others }: Props) => { ); }; - -export default ProjectsCountCard; diff --git a/src/components/dashboard/projects/ProjectsTables/ProjectsTable.tsx b/src/components/dashboard/projects/ProjectsTables/ProjectsTable.tsx index fdff1cb..b17d415 100644 --- a/src/components/dashboard/projects/ProjectsTables/ProjectsTable.tsx +++ b/src/components/dashboard/projects/ProjectsTables/ProjectsTable.tsx @@ -96,7 +96,7 @@ type Props = { data: Projects[]; } & TableProps; -const ProjectsTable = ({ data, ...others }: Props) => { +export const ProjectsTable = ({ data, ...others }: Props) => { return (
{ /> ); }; - -export default ProjectsTable; diff --git a/src/components/dashboard/projects/index.ts b/src/components/dashboard/projects/index.ts index a895bbf..aeea749 100644 --- a/src/components/dashboard/projects/index.ts +++ b/src/components/dashboard/projects/index.ts @@ -1,5 +1,3 @@ -import ClientsTable from './ClientsTable/ClientsTable.tsx'; -import ProjectsCountCard from './ProjectsCountCard/ProjectsCountCard.tsx'; -import ProjectsTable from './ProjectsTables/ProjectsTable.tsx'; - -export { ClientsTable, ProjectsTable, ProjectsCountCard }; +export { ClientsTable } from './ClientsTable/ClientsTable.tsx'; +export { ProjectsCountCard } from './ProjectsCountCard/ProjectsCountCard.tsx'; +export { ProjectsTable } from './ProjectsTables/ProjectsTable.tsx'; diff --git a/src/components/dashboard/shared/PostsCard/PostsCard.tsx b/src/components/dashboard/shared/PostsCard/PostsCard.tsx index 84a280f..0cdc3a0 100644 --- a/src/components/dashboard/shared/PostsCard/PostsCard.tsx +++ b/src/components/dashboard/shared/PostsCard/PostsCard.tsx @@ -47,7 +47,7 @@ type Props = { error?: ReactNode; } & CardProps; -const PostsCard = ({ as, data, error, loading, ...others }: Props) => { +export const PostsCard = ({ as, data, error, loading, ...others }: Props) => { const { token } = theme.useToken(); return ( @@ -178,5 +178,3 @@ const PostsCard = ({ as, data, error, loading, ...others }: Props) => { ); }; - -export default PostsCard; diff --git a/src/components/dashboard/shared/ProjectsCard/ProjectsCard.tsx b/src/components/dashboard/shared/ProjectsCard/ProjectsCard.tsx index bfdd911..5d95baa 100644 --- a/src/components/dashboard/shared/ProjectsCard/ProjectsCard.tsx +++ b/src/components/dashboard/shared/ProjectsCard/ProjectsCard.tsx @@ -23,7 +23,7 @@ type Props = { size?: 'small' | 'default'; } & CardProps; -const ProjectsCard = (props: Props) => { +export const ProjectsCard = (props: Props) => { const { size, project: { @@ -151,5 +151,3 @@ const ProjectsCard = (props: Props) => { ); }; - -export default ProjectsCard; diff --git a/src/components/dashboard/shared/RevenueCard/RevenueCard.tsx b/src/components/dashboard/shared/RevenueCard/RevenueCard.tsx index 8854e30..29fb799 100644 --- a/src/components/dashboard/shared/RevenueCard/RevenueCard.tsx +++ b/src/components/dashboard/shared/RevenueCard/RevenueCard.tsx @@ -13,7 +13,7 @@ type Props = { height?: number; } & CardProps; -const RevenueCard = (props: Props) => { +export const RevenueCard = (props: Props) => { const { title, value, diff, justify, height, ...others } = props; return ( @@ -52,5 +52,3 @@ const RevenueCard = (props: Props) => { ); }; - -export default RevenueCard; diff --git a/src/components/dashboard/shared/index.ts b/src/components/dashboard/shared/index.ts index 19fdcd1..c5c0c28 100644 --- a/src/components/dashboard/shared/index.ts +++ b/src/components/dashboard/shared/index.ts @@ -1,5 +1,3 @@ -import RevenueCard from './RevenueCard/RevenueCard.tsx'; -import PostsCard from './PostsCard/PostsCard.tsx'; -import ProjectsCard from './ProjectsCard/ProjectsCard.tsx'; - -export { RevenueCard, PostsCard, ProjectsCard }; +export { RevenueCard } from './RevenueCard/RevenueCard.tsx'; +export { PostsCard } from './PostsCard/PostsCard.tsx'; +export { ProjectsCard } from './ProjectsCard/ProjectsCard.tsx'; diff --git a/src/components/dashboard/social/CommentsCard/CommentsCard.tsx b/src/components/dashboard/social/CommentsCard/CommentsCard.tsx index 2062613..3dbbd93 100644 --- a/src/components/dashboard/social/CommentsCard/CommentsCard.tsx +++ b/src/components/dashboard/social/CommentsCard/CommentsCard.tsx @@ -27,7 +27,7 @@ type Props = { loading?: boolean; } & CardProps; -const CommentsCard = ({ data, error, loading, ...others }: Props) => ( +export const CommentsCard = ({ data, error, loading, ...others }: Props) => ( ( )} ); - -export default CommentsCard; diff --git a/src/components/dashboard/social/DevicesCardChart/DevicesCardChart.tsx b/src/components/dashboard/social/DevicesCardChart/DevicesCardChart.tsx index 68e3616..1abb301 100644 --- a/src/components/dashboard/social/DevicesCardChart/DevicesCardChart.tsx +++ b/src/components/dashboard/social/DevicesCardChart/DevicesCardChart.tsx @@ -74,7 +74,7 @@ const PieChart = () => { type Props = CardProps; -const DevicesCardChart = ({ ...others }: Props) => { +export const DevicesCardChart = ({ ...others }: Props) => { return ( { ); }; - -export default DevicesCardChart; diff --git a/src/components/dashboard/social/FollowersChart/FollowersChart.tsx b/src/components/dashboard/social/FollowersChart/FollowersChart.tsx index 200d519..43cd882 100644 --- a/src/components/dashboard/social/FollowersChart/FollowersChart.tsx +++ b/src/components/dashboard/social/FollowersChart/FollowersChart.tsx @@ -243,7 +243,7 @@ const TAB_CONTENT: Record = { type Props = CardProps; -const FollowersChart = ({ ...others }: Props) => { +export const FollowersChart = ({ ...others }: Props) => { const [activeTabKey, setActiveTabKey] = useState('all'); const onTabChange = (key: TabKeys) => { @@ -269,5 +269,3 @@ const FollowersChart = ({ ...others }: Props) => { ); }; - -export default FollowersChart; diff --git a/src/components/dashboard/social/LikesChart/LikesChart.tsx b/src/components/dashboard/social/LikesChart/LikesChart.tsx index c8fb064..bf9efc8 100644 --- a/src/components/dashboard/social/LikesChart/LikesChart.tsx +++ b/src/components/dashboard/social/LikesChart/LikesChart.tsx @@ -147,12 +147,10 @@ const ColumnChart = () => { type Props = CardProps; -const LikesChart = ({ ...others }: Props) => { +export const LikesChart = ({ ...others }: Props) => { return ( ); }; - -export default LikesChart; diff --git a/src/components/dashboard/social/MilestonesCard/MilestonesCard.tsx b/src/components/dashboard/social/MilestonesCard/MilestonesCard.tsx index 80d63d8..9c46b13 100644 --- a/src/components/dashboard/social/MilestonesCard/MilestonesCard.tsx +++ b/src/components/dashboard/social/MilestonesCard/MilestonesCard.tsx @@ -39,7 +39,7 @@ const MOCK_DATA = [ type Props = CardProps; -const MilestonesCard = ({ ...others }: Props) => { +export const MilestonesCard = ({ ...others }: Props) => { return ( { ); }; - -export default MilestonesCard; diff --git a/src/components/dashboard/social/SocialStatsCard/SocialStatsCard.tsx b/src/components/dashboard/social/SocialStatsCard/SocialStatsCard.tsx index a984b0d..1435eab 100644 --- a/src/components/dashboard/social/SocialStatsCard/SocialStatsCard.tsx +++ b/src/components/dashboard/social/SocialStatsCard/SocialStatsCard.tsx @@ -17,7 +17,7 @@ type Props = { loading?: boolean; } & CardProps; -const SocialStatsCard = ({ +export const SocialStatsCard = ({ value, title, loading, @@ -70,5 +70,3 @@ const SocialStatsCard = ({ ); }; - -export default SocialStatsCard; diff --git a/src/components/dashboard/social/index.ts b/src/components/dashboard/social/index.ts index 5aff68b..d21eb11 100644 --- a/src/components/dashboard/social/index.ts +++ b/src/components/dashboard/social/index.ts @@ -1,15 +1,6 @@ -import SocialStatsCard from './SocialStatsCard/SocialStatsCard.tsx'; -import FollowersChart from './FollowersChart/FollowersChart.tsx'; -import LikesChart from './LikesChart/LikesChart.tsx'; -import DevicesCardChart from './DevicesCardChart/DevicesCardChart.tsx'; -import MilestonesCard from './MilestonesCard/MilestonesCard.tsx'; -import CommentsCard from './CommentsCard/CommentsCard.tsx'; - -export { - SocialStatsCard, - FollowersChart, - LikesChart, - DevicesCardChart, - MilestonesCard, - CommentsCard, -}; +export { SocialStatsCard } from './SocialStatsCard/SocialStatsCard.tsx'; +export { FollowersChart } from './FollowersChart/FollowersChart.tsx'; +export { LikesChart } from './LikesChart/LikesChart.tsx'; +export { DevicesCardChart } from './DevicesCardChart/DevicesCardChart.tsx'; +export { MilestonesCard } from './MilestonesCard/MilestonesCard.tsx'; +export { CommentsCard } from './CommentsCard/CommentsCard.tsx'; diff --git a/src/components/index.ts b/src/components/index.ts index 416b83c..9d3d8c9 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -1,143 +1,22 @@ -import Logo from './Logo/Logo'; -import MoreMenu from './MoreMenu/MoreMenu'; -import { - ProjectsTable, - ProjectsCountCard, - RevenueCard, - ProjectsCard, - ClientsTable, - EarningsCard, - CampaignsCard, - GetStartedCard, - OrdersChart, - SubscribersChart, - CustomerReviewsCard, - RecentUsersCard, - LatestOrdersCard, - MarketingSocialStatsCard, - VisitorsChartCard, - MarketingStatsCard, - CampaignsActivity, - CampaignsAdsCard, - AudienceLocationChart, - SocialStatsCard, - FollowersChart, - LikesChart, - DevicesCardChart, - PostsCard, - MilestonesCard, - CommentsCard, - AuctionCarousel, - CreatorsCard, - TopItemsCard, - TransactionsCard, - BiddingCategoriesCard, - CoursesCard, - CoursesCarousel, - LearningStatsCard, - StudyStatisticsCard, - ProgressCard, - ExamsCard, - CommunityGroupCard, - LogisticsStatsCard, - DeliveryTableCard, - DeliveryAnalyticsCard, - DailyPlanCard, - TruckListCard, - DeliveryRequestCard, - WeeklyActivityCard, - TasksChartCard, - TasksListCard, -} from './dashboard'; -import UserAvatar from './UserAvatar/UserAvatar'; -import NotificationsItem from './NotificationsItem/NotificationsItem'; -import NotificationsCard from './NotificationsCard/NotificationsCard'; -import Card from './Card/Card'; -import PageHeader from './PageHeader/PageHeader'; -import { Bar, Container as NContainer, Nprogress } from './Nprogress'; -import EmployeeCard from './EmployeeCard/EmployeeCard'; -import BlogsListCard from './corporate/BlogsListCard/BlogsListCard'; -import SocialMediaCard from './SocialMediaCard/SocialMediaCard'; -import FaqCollapse from './FaqCollapse/FaqCollapse'; -import ContactForm from './ContactForm/ContactForm'; -import PricingTable from './PricingTable/PricingTable'; -import SitemapCard from './SitemapCard/SitemapCard'; -import Flex from './Flex/Flex'; -import TimelineCard from './TimelineCard/TimelineCard'; -import Loader from './Loader/Loader'; -import BackBtn from './BackBtn/BackBtn.tsx'; -import RefreshBtn from './RefreshBtn/RefreshBtn.tsx'; -import Container from './Container'; - -export { - Logo, - MoreMenu, - ProjectsCountCard, - ProjectsCard, - ProjectsTable, - CustomerReviewsCard, - RecentUsersCard, - CampaignsCard, - GetStartedCard, - OrdersChart, - RevenueCard, - EarningsCard, - SubscribersChart, - TimelineCard, - LatestOrdersCard, - ClientsTable, - MarketingSocialStatsCard, - MarketingStatsCard, - VisitorsChartCard, - CampaignsActivity, - CampaignsAdsCard, - AudienceLocationChart, - SocialStatsCard, - FollowersChart, - LikesChart, - DevicesCardChart, - PostsCard, - MilestonesCard, - CommentsCard, - AuctionCarousel, - UserAvatar, - CreatorsCard, - TopItemsCard, - TransactionsCard, - BiddingCategoriesCard, - CoursesCard, - CoursesCarousel, - LearningStatsCard, - StudyStatisticsCard, - ProgressCard, - ExamsCard, - CommunityGroupCard, - LogisticsStatsCard, - DeliveryTableCard, - DeliveryAnalyticsCard, - DailyPlanCard, - TruckListCard, - DeliveryRequestCard, - WeeklyActivityCard, - TasksChartCard, - TasksListCard, - NotificationsItem, - NotificationsCard, - Card, - PageHeader, - Bar, - NContainer, - Nprogress, - EmployeeCard, - BlogsListCard, - SocialMediaCard, - FaqCollapse, - ContactForm, - PricingTable, - SitemapCard, - Flex, - Loader, - BackBtn, - RefreshBtn, - Container, -}; +export { BackBtn } from './BackBtn/BackBtn.tsx'; +export { BlogsListCard } from './corporate/BlogsListCard/BlogsListCard'; +export { Card } from './Card/Card'; +export { ContactForm } from './ContactForm/ContactForm'; +export { EmployeeCard } from './EmployeeCard/EmployeeCard'; +export { FaqCollapse } from './FaqCollapse/FaqCollapse'; +export { Flex } from './Flex/Flex'; +export { Loader } from './Loader/Loader'; +export { Logo } from './Logo/Logo'; +export { MoreMenu } from './MoreMenu/MoreMenu'; +export { NotificationsCard } from './NotificationsCard/NotificationsCard'; +export { NotificationsItem } from './NotificationsItem/NotificationsItem'; +export { PageHeader } from './PageHeader/PageHeader'; +export { PricingTable } from './PricingTable/PricingTable'; +export { RefreshBtn } from './RefreshBtn/RefreshBtn.tsx'; +export { SitemapCard } from './SitemapCard/SitemapCard'; +export { SocialMediaCard } from './SocialMediaCard/SocialMediaCard'; +export { TimelineCard } from './TimelineCard/TimelineCard'; +export { UserAvatar } from './UserAvatar/UserAvatar'; +export * from './Nprogress'; +export * from './dashboard'; +export * from './Container'; diff --git a/src/layouts/app/App.tsx b/src/layouts/app/App.tsx index 3a8e759..108901e 100644 --- a/src/layouts/app/App.tsx +++ b/src/layouts/app/App.tsx @@ -31,7 +31,7 @@ import { useMediaQuery } from 'react-responsive'; import SideNav from './SideNav.tsx'; import HeaderNav from './HeaderNav.tsx'; import FooterNav from './FooterNav.tsx'; -import { Nprogress } from '../../components'; +import { NProgress } from '../../components'; import { PATH_LANDING } from '../../constants'; const { Content } = Layout; @@ -40,7 +40,7 @@ type AppLayoutProps = { children: ReactNode; }; -const AppLayout = ({ children }: AppLayoutProps) => { +export const AppLayout = ({ children }: AppLayoutProps) => { const { token: { borderRadius }, } = theme.useToken(); @@ -106,7 +106,7 @@ const AppLayout = ({ children }: AppLayoutProps) => { return ( <> - + { ); }; - -export default AppLayout; diff --git a/src/layouts/app/index.ts b/src/layouts/app/index.ts index a7c0fb7..b45315f 100644 --- a/src/layouts/app/index.ts +++ b/src/layouts/app/index.ts @@ -1,3 +1 @@ -import AppLayout from './App.tsx'; - -export { AppLayout }; +export { AppLayout } from './App.tsx'; diff --git a/src/layouts/corporate/index.tsx b/src/layouts/corporate/index.tsx index 490e875..c77b257 100644 --- a/src/layouts/corporate/index.tsx +++ b/src/layouts/corporate/index.tsx @@ -23,7 +23,7 @@ const BLOGS_DATA = Array.from({ length: 23 }).map((_, i) => ({ 'We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure), to help people create their product prototypes beautifully and efficiently.', })); -const CorporateLayout = () => { +export const CorporateLayout = () => { const { pathname } = useLocation(); const stylesContext = useStylesContext(); @@ -107,5 +107,3 @@ const CorporateLayout = () => { ); }; - -export default CorporateLayout; diff --git a/src/layouts/dashboards/index.tsx b/src/layouts/dashboards/index.tsx index 6f9df04..127f639 100644 --- a/src/layouts/dashboards/index.tsx +++ b/src/layouts/dashboards/index.tsx @@ -1,12 +1,10 @@ import { AppLayout } from '../app'; import { Outlet } from 'react-router-dom'; -const DashboardLayout = () => { +export const DashboardLayout = () => { return ( ); }; - -export default DashboardLayout; diff --git a/src/layouts/guest/Guest.tsx b/src/layouts/guest/Guest.tsx index 0575a35..ca23e5b 100644 --- a/src/layouts/guest/Guest.tsx +++ b/src/layouts/guest/Guest.tsx @@ -23,7 +23,7 @@ import { ProductOutlined, } from '@ant-design/icons'; import { useMediaQuery } from 'react-responsive'; -import { Logo, Nprogress } from '../../components'; +import { Logo, NProgress } from '../../components'; import { PATH_AUTH, PATH_DASHBOARD, @@ -34,7 +34,7 @@ import { const { Header, Content, Footer } = Layout; -const GuestLayout = () => { +export const GuestLayout = () => { const { token: { borderRadius }, } = theme.useToken(); @@ -65,7 +65,7 @@ const GuestLayout = () => { return ( <> - + { ); }; - -export default GuestLayout; diff --git a/src/layouts/index.ts b/src/layouts/index.ts index 80ea8ee..fed88bb 100644 --- a/src/layouts/index.ts +++ b/src/layouts/index.ts @@ -1,13 +1,5 @@ -import { AppLayout } from './app'; -import DashboardLayout from './dashboards'; -import GuestLayout from './guest/Guest.tsx'; -import CorporateLayout from './corporate'; -import UserAccountLayout from './userAccount'; - -export { - AppLayout, - DashboardLayout, - GuestLayout, - CorporateLayout, - UserAccountLayout, -}; +export { AppLayout } from './app'; +export { DashboardLayout } from './dashboards'; +export { GuestLayout } from './guest/Guest.tsx'; +export { CorporateLayout } from './corporate'; +export { UserAccountLayout } from './userAccount'; diff --git a/src/layouts/userAccount/index.tsx b/src/layouts/userAccount/index.tsx index 8801824..d5d7a76 100644 --- a/src/layouts/userAccount/index.tsx +++ b/src/layouts/userAccount/index.tsx @@ -1,4 +1,4 @@ -import { AppLayout } from '../index.ts'; +import { AppLayout } from '../app'; import { Col, ConfigProvider, @@ -71,7 +71,7 @@ const TAB_ITEMS: TabsProps['items'] = USER_PROFILE_ITEMS.map((u) => ({ label: u.title, })); -const UserAccountLayout = () => { +export const UserAccountLayout = () => { const { token: { borderRadius }, } = theme.useToken(); @@ -144,5 +144,3 @@ const UserAccountLayout = () => { ); }; - -export default UserAccountLayout;