Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3d150f7a6b | |||
| bbd100d04e | |||
| 95a10cf795 | |||
| 5b5a083987 |
@@ -67,8 +67,8 @@ export default AccountDashboard;
|
|||||||
|
|
||||||
const TopBanner = ({ image, title = "", desc = "", btn, link_path, key }) => {
|
const TopBanner = ({ image, title = "", desc = "", btn, link_path, key }) => {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col shadow-md rounded-xl dark:border-[#5356fb29]">
|
<div className="flex flex-col shadow-md rounded-xl dark:border-[#5356fb29]" key={key}>
|
||||||
<Link to={link_path} key={key} className="h-[12rem] rounded-t-xl">
|
<Link to={link_path} className="h-[12rem] rounded-t-xl">
|
||||||
<img
|
<img
|
||||||
src={image}
|
src={image}
|
||||||
alt="banner-img"
|
alt="banner-img"
|
||||||
|
|||||||
@@ -687,12 +687,27 @@ const HomeButton = () => {
|
|||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
to="/"
|
to="/"
|
||||||
className="flex user-balance cursor-pointer w-[100px] h-[48px] items-center rounded-full relative bg-sky-blue pr-1.5 pl-4"
|
className="flex user-balance cursor-pointer w-[110px] h-[48px] items-center rounded-full relative bg-sky-blue pr-1.5 pl-4"
|
||||||
>
|
>
|
||||||
<div className="flex items-center lg:justify-between justify-center w-full h-full">
|
<div className="flex items-center lg:justify-between justify-center w-full h-full">
|
||||||
<span className="hidden"></span>
|
<span className="">
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
fill="none"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
strokeWidth={1.5}
|
||||||
|
stroke="currentColor"
|
||||||
|
className="w-7 h-7 stroke-white fill-white"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
d="m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
<p className="lg:text-xl text-lg font-bold text-white">Home</p>
|
<p className="lg:text-xl text-lg font-bold text-white">Home</p>
|
||||||
<span className="hidden"></span>
|
<span className=""></span>
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ export default function Resources(props) {
|
|||||||
const CreatedBits = __resources?.productdata?.datas;
|
const CreatedBits = __resources?.productdata?.datas;
|
||||||
const blogItems = __resources?.blogdata?.payload;
|
const blogItems = __resources?.blogdata?.payload;
|
||||||
|
|
||||||
|
console.log(__resources);
|
||||||
|
console.log("Blog data >> ", blogItems);
|
||||||
|
|
||||||
// My Items Data
|
// My Items Data
|
||||||
const [uploadedFiles, setUploadedFiles] = useState({
|
const [uploadedFiles, setUploadedFiles] = useState({
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -63,7 +66,7 @@ export default function Resources(props) {
|
|||||||
loading: false,
|
loading: false,
|
||||||
msg: "success",
|
msg: "success",
|
||||||
data: res?.result_list,
|
data: res?.result_list,
|
||||||
image:res?.session_image_server
|
image: res?.session_image_server,
|
||||||
}));
|
}));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setUploadedFiles((prev) => ({
|
setUploadedFiles((prev) => ({
|
||||||
@@ -79,7 +82,13 @@ export default function Resources(props) {
|
|||||||
}, [uploadsTable]);
|
}, [uploadsTable]);
|
||||||
|
|
||||||
// const [tab, setTab] = useState(tab_categories ? tab_categories[0]?.name : "");
|
// const [tab, setTab] = useState(tab_categories ? tab_categories[0]?.name : "");
|
||||||
const [tab, setTab] = useState(props.activeTab? props.activeTab : tab_categories ? tab_categories[0]?.name : "");
|
const [tab, setTab] = useState(
|
||||||
|
props.activeTab
|
||||||
|
? props.activeTab
|
||||||
|
: tab_categories
|
||||||
|
? tab_categories[0]?.name
|
||||||
|
: ""
|
||||||
|
);
|
||||||
|
|
||||||
const tabHandler = (value) => {
|
const tabHandler = (value) => {
|
||||||
setTab(value);
|
setTab(value);
|
||||||
@@ -105,8 +114,12 @@ export default function Resources(props) {
|
|||||||
|
|
||||||
// const selectedTabComponent = tabComponents[tab] || defaultTabComponent;
|
// const selectedTabComponent = tabComponents[tab] || defaultTabComponent;
|
||||||
|
|
||||||
const defaultTabComponent = props.activeTab ? tabComponents[props.activeTab] : <BlogTab blogdata={blogItems} />;
|
const defaultTabComponent = props.activeTab ? (
|
||||||
const selectedTabComponent = tabComponents[tab] || defaultTabComponent;
|
tabComponents[props.activeTab]
|
||||||
|
) : (
|
||||||
|
<BlogTab blogdata={blogItems} />
|
||||||
|
);
|
||||||
|
const selectedTabComponent = tabComponents[tab] || defaultTabComponent;
|
||||||
|
|
||||||
// Tab Item Component
|
// Tab Item Component
|
||||||
const TabItem = ({ tabValue, isActive }) => {
|
const TabItem = ({ tabValue, isActive }) => {
|
||||||
@@ -160,17 +173,16 @@ export default function Resources(props) {
|
|||||||
<ul className="lg:flex lg:space-x-14 space-x-8">
|
<ul className="lg:flex lg:space-x-14 space-x-8">
|
||||||
{tabCategories?.length > 0 &&
|
{tabCategories?.length > 0 &&
|
||||||
tabCategories?.map((tabValue, idx) => {
|
tabCategories?.map((tabValue, idx) => {
|
||||||
if(tabValue.enabled){
|
if (tabValue.enabled) {
|
||||||
return (
|
return (
|
||||||
<TabItem
|
<TabItem
|
||||||
key={tabValue.id}
|
key={tabValue.id}
|
||||||
tabValue={tabValue}
|
tabValue={tabValue}
|
||||||
isActive={tab === tabValue.name || (idx === 0 && tab === "")}
|
isActive={tab === tabValue.name || (idx === 0 && tab === "")}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
}
|
})}
|
||||||
)}
|
|
||||||
</ul>
|
</ul>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ export default function MyUploadedFiles({ uploadedFiles }) {
|
|||||||
prev={currentPage == 0 ? true : false}
|
prev={currentPage == 0 ? true : false}
|
||||||
next={
|
next={
|
||||||
currentPage + Number(process.env.REACT_APP_ITEM_PER_PAGE) >=
|
currentPage + Number(process.env.REACT_APP_ITEM_PER_PAGE) >=
|
||||||
uploadedFiles?.data.length
|
uploadedFiles?.data?.length
|
||||||
? true
|
? true
|
||||||
: false
|
: false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ class usersService {
|
|||||||
return this.postAuxEnd("/createuser", reqData);
|
return this.postAuxEnd("/createuser", reqData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blogData() {
|
||||||
|
return this.getAuxEnd("/blogdata", null);
|
||||||
|
}
|
||||||
|
|
||||||
CompleteOauthLogin(reqData) {
|
CompleteOauthLogin(reqData) {
|
||||||
localStorage.setItem("session_token", ``);
|
localStorage.setItem("session_token", ``);
|
||||||
return this.postAuxEnd("/authlogin", reqData);
|
return this.postAuxEnd("/authlogin", reqData);
|
||||||
|
|||||||
Reference in New Issue
Block a user