From 183be258b56de3c9d91b3bdfa1e92bc8d4fbf698 Mon Sep 17 00:00:00 2001 From: Moaz Dawalibi Date: Sat, 14 Sep 2024 11:48:13 +0300 Subject: [PATCH] fixes --- index.html | 6 +++++- public/App/Logo.png | Bin 0 -> 3524 bytes src/Components/Ui/ContactInfo.tsx | 2 +- src/Components/Ui/CustomTitle.tsx | 2 +- src/HighOrderComponent/WithDrawer.tsx | 4 ++-- src/Hooks/useFetchData.tsx | 2 +- src/Layout/Footer.tsx | 1 + src/Layout/app/Header.tsx | 4 +++- src/Layout/app/Layout.tsx | 2 ++ src/Pages/SingleProject/Page.tsx | 2 +- src/api/config.ts | 3 ++- src/type/ContactInfoProps.ts | 2 +- src/type/HeaderLinks.ts | 1 - src/type/app.ts | 2 +- tsconfig.json | 1 - 15 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 public/App/Logo.png 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 0000000000000000000000000000000000000000..1e9857e9535af16a8fefa78225ca74b3c6f62b6a GIT binary patch literal 3524 zcmV;#4LkCQP)SKCla!iiNNeE|dMC}9-x%7HrJ4f^j4;;z3jG75J)Wk^ZzjnUOrmS)}`3?y2 zoZ{sIY&J4prmn58ys|$WH4`+c<5Q<*$IEX0s|a(Tm!g^rAqMN^LFl+Q%X1WoFA z!Fk6}ua^(1arG|198khNj+zOY)NzFfqYze6?MgQojOQq7CTKFpGc!L-ayjW>M734w zjocR0Ody~pLdC71rzj=7?^cX3RusKJcA{p2CRy>UEXsM@=*hZ-Ru7nW7pi#%4-&nT7s&X@F9WmxU zxI?0iXymHVVcXLOY}sV1QpRbi=R~En(@W`}*u1(Kb?1d?R6$YuAbH|jBcnF3y2U#$ z1>bOnwHA1y4=`GtA(KRQbpFq=iQD!&ZxR*hd@2Dh3yaooHa*)v zT~?9V*Wfyl9!@+T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{#LS&L zw?9PL9thv#kfekHVST%6*RI}R%PFvdd*_{Z(xH7DI2;arl9w-E{xJ|!G-@LJD9K8f zE?vT6V`KXO(-#9@gag|L0?F8Ob941=+O!FR&p}B^NhcvXj1Y0b;E(`OaTy}5CqxDU z);$XmNT6PXNlJmUHy { ) } -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 ] }