diff --git a/index.html b/index.html index 1259d9b..84d421f 100644 --- a/index.html +++ b/index.html @@ -3,13 +3,17 @@ + + + + - React-ts + Misbar diff --git a/public/App/Logo.png b/public/App/Logo.png new file mode 100644 index 0000000..1e9857e Binary files /dev/null and b/public/App/Logo.png differ diff --git a/src/Components/Ui/ContactInfo.tsx b/src/Components/Ui/ContactInfo.tsx index 86b5822..71e937b 100644 --- a/src/Components/Ui/ContactInfo.tsx +++ b/src/Components/Ui/ContactInfo.tsx @@ -12,4 +12,4 @@ const ContactInfo = ({ title,info}:ContactInfoProps) => { ) } -export default ContactInfo \ No newline at end of file +export default ContactInfo diff --git a/src/Components/Ui/CustomTitle.tsx b/src/Components/Ui/CustomTitle.tsx index d7e3c4c..aeac570 100644 --- a/src/Components/Ui/CustomTitle.tsx +++ b/src/Components/Ui/CustomTitle.tsx @@ -3,7 +3,7 @@ import { CustomTitleProps } from '../../type/app'; const CustomTitle = ({title}:CustomTitleProps) => { - const {t} = useTranslation(); + const {t} = useTranslation(); return (
diff --git a/src/HighOrderComponent/WithDrawer.tsx b/src/HighOrderComponent/WithDrawer.tsx index 95385ff..013d8c5 100644 --- a/src/HighOrderComponent/WithDrawer.tsx +++ b/src/HighOrderComponent/WithDrawer.tsx @@ -2,9 +2,9 @@ import React, { useState, ReactNode, ReactElement } from 'react'; import type { DrawerProps } from 'antd'; import { Drawer, Space } from 'antd'; -interface WithDrawerProps { +interface WithDrawerProps extends DrawerProps { button: React.ReactNode; - children: (props: { closeDrawer: () => void }) => ReactElement; + children: any; title: string; className?: string; width?: string; diff --git a/src/Hooks/useFetchData.tsx b/src/Hooks/useFetchData.tsx index fef546a..f7aa6cb 100644 --- a/src/Hooks/useFetchData.tsx +++ b/src/Hooks/useFetchData.tsx @@ -3,7 +3,7 @@ import { BaseURL } from '../api/config'; const fetchData = async (fetchApi:any) => { const response = await fetch(`${BaseURL}${fetchApi}`); - + if (!response.ok) { throw new Error('Network response was not ok'); } diff --git a/src/Layout/Footer.tsx b/src/Layout/Footer.tsx index 3d012e3..d772a60 100644 --- a/src/Layout/Footer.tsx +++ b/src/Layout/Footer.tsx @@ -61,6 +61,7 @@ const Footer = ({data, isLoading}:THeaderPage) => {
+
{
- { isLoading ? : + + { + isLoading ? : Misbar Logo }
diff --git a/src/Layout/app/Layout.tsx b/src/Layout/app/Layout.tsx index 6d1bf68..03b0c06 100644 --- a/src/Layout/app/Layout.tsx +++ b/src/Layout/app/Layout.tsx @@ -4,7 +4,9 @@ import Footer from '../Footer'; import { useFetchData } from '../../Hooks/useFetchData'; const Layout = (({ children, className = "" }: { children: React.ReactNode, className?: string }) => { + const { data, isLoading } = useFetchData('api/home'); + return (
diff --git a/src/Pages/SingleProject/Page.tsx b/src/Pages/SingleProject/Page.tsx index c703372..f516d51 100644 --- a/src/Pages/SingleProject/Page.tsx +++ b/src/Pages/SingleProject/Page.tsx @@ -9,7 +9,7 @@ import ReactPlayer from 'react-player'; import { useFetchData } from '../../Hooks/useFetchData'; const SingleProjectPage = () => { - const { id } = useParams<{ id: string }>(); + const { id } = useParams<{ id: string }>(); const { data, isLoading} = useFetchData('api/project'); const [playing, setPlaying] = useState(false); diff --git a/src/api/config.ts b/src/api/config.ts index 326e1cd..09e9c26 100644 --- a/src/api/config.ts +++ b/src/api/config.ts @@ -1,3 +1,4 @@ -export const BaseURL = `http://127.0.0.1:8000/` +// export const BaseURL = `http://127.0.0.1:8000/` +export const BaseURL = `http://misbar-back.point-dev.net/` export const BaseURL_IMAGE = BaseURL.slice(0,-1); diff --git a/src/type/ContactInfoProps.ts b/src/type/ContactInfoProps.ts index fd74e5b..9ab4f62 100644 --- a/src/type/ContactInfoProps.ts +++ b/src/type/ContactInfoProps.ts @@ -1,4 +1,4 @@ interface ContactInfoProps { title:string, info:string, -} \ No newline at end of file +} diff --git a/src/type/HeaderLinks.ts b/src/type/HeaderLinks.ts index e3faf75..27c70ce 100644 --- a/src/type/HeaderLinks.ts +++ b/src/type/HeaderLinks.ts @@ -4,5 +4,4 @@ interface HedaerLinksProps { icon:any, isOnlyDrawer?:boolean, closeDrawer?: () => void; - } diff --git a/src/type/app.ts b/src/type/app.ts index cd14524..63fcaca 100644 --- a/src/type/app.ts +++ b/src/type/app.ts @@ -19,7 +19,7 @@ export type THeaderLink = { isMulti?:boolean, extraText?:string, extraLink?:string, - }; +}; export type THeaderPage = { isHaveHeader?: boolean; diff --git a/tsconfig.json b/tsconfig.json index f3d90b3..3f5243d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,7 +23,6 @@ "include": [ "src", "**/*.ts", - "src/Components/Theme2.tsx", "src/auto-imports.d.ts" // Include the auto-imports.d.ts file here ] }