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 }) => {
|
||||
return (
|
||||
<div className="flex flex-col shadow-md rounded-xl dark:border-[#5356fb29]">
|
||||
<Link to={link_path} key={key} className="h-[12rem] rounded-t-xl">
|
||||
<div className="flex flex-col shadow-md rounded-xl dark:border-[#5356fb29]" key={key}>
|
||||
<Link to={link_path} className="h-[12rem] rounded-t-xl">
|
||||
<img
|
||||
src={image}
|
||||
alt="banner-img"
|
||||
|
||||
@@ -687,12 +687,27 @@ const HomeButton = () => {
|
||||
return (
|
||||
<Link
|
||||
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">
|
||||
<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>
|
||||
<span className="hidden"></span>
|
||||
<span className=""></span>
|
||||
</div>
|
||||
</Link>
|
||||
);
|
||||
|
||||
@@ -33,6 +33,9 @@ export default function Resources(props) {
|
||||
const CreatedBits = __resources?.productdata?.datas;
|
||||
const blogItems = __resources?.blogdata?.payload;
|
||||
|
||||
console.log(__resources);
|
||||
console.log("Blog data >> ", blogItems);
|
||||
|
||||
// My Items Data
|
||||
const [uploadedFiles, setUploadedFiles] = useState({
|
||||
loading: false,
|
||||
@@ -63,7 +66,7 @@ export default function Resources(props) {
|
||||
loading: false,
|
||||
msg: "success",
|
||||
data: res?.result_list,
|
||||
image:res?.session_image_server
|
||||
image: res?.session_image_server,
|
||||
}));
|
||||
} catch (error) {
|
||||
setUploadedFiles((prev) => ({
|
||||
@@ -79,7 +82,13 @@ export default function Resources(props) {
|
||||
}, [uploadsTable]);
|
||||
|
||||
// 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) => {
|
||||
setTab(value);
|
||||
@@ -105,8 +114,12 @@ export default function Resources(props) {
|
||||
|
||||
// const selectedTabComponent = tabComponents[tab] || defaultTabComponent;
|
||||
|
||||
const defaultTabComponent = props.activeTab ? tabComponents[props.activeTab] : <BlogTab blogdata={blogItems} />;
|
||||
const selectedTabComponent = tabComponents[tab] || defaultTabComponent;
|
||||
const defaultTabComponent = props.activeTab ? (
|
||||
tabComponents[props.activeTab]
|
||||
) : (
|
||||
<BlogTab blogdata={blogItems} />
|
||||
);
|
||||
const selectedTabComponent = tabComponents[tab] || defaultTabComponent;
|
||||
|
||||
// Tab Item Component
|
||||
const TabItem = ({ tabValue, isActive }) => {
|
||||
@@ -160,17 +173,16 @@ export default function Resources(props) {
|
||||
<ul className="lg:flex lg:space-x-14 space-x-8">
|
||||
{tabCategories?.length > 0 &&
|
||||
tabCategories?.map((tabValue, idx) => {
|
||||
if(tabValue.enabled){
|
||||
if (tabValue.enabled) {
|
||||
return (
|
||||
<TabItem
|
||||
key={tabValue.id}
|
||||
tabValue={tabValue}
|
||||
isActive={tab === tabValue.name || (idx === 0 && tab === "")}
|
||||
/>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
)}
|
||||
})}
|
||||
</ul>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -134,7 +134,7 @@ export default function MyUploadedFiles({ uploadedFiles }) {
|
||||
prev={currentPage == 0 ? true : false}
|
||||
next={
|
||||
currentPage + Number(process.env.REACT_APP_ITEM_PER_PAGE) >=
|
||||
uploadedFiles?.data.length
|
||||
uploadedFiles?.data?.length
|
||||
? true
|
||||
: false
|
||||
}
|
||||
|
||||
@@ -31,6 +31,10 @@ class usersService {
|
||||
return this.postAuxEnd("/createuser", reqData);
|
||||
}
|
||||
|
||||
blogData() {
|
||||
return this.getAuxEnd("/blogdata", null);
|
||||
}
|
||||
|
||||
CompleteOauthLogin(reqData) {
|
||||
localStorage.setItem("session_token", ``);
|
||||
return this.postAuxEnd("/authlogin", reqData);
|
||||
|
||||
Reference in New Issue
Block a user