Merge branch 'home-page-hero-adjustment' of WrenchBoard/Users-Wrench into master
This commit is contained in:
@@ -8,6 +8,7 @@ function Redirect() {
|
|||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const userApi = new usersService();
|
const userApi = new usersService();
|
||||||
|
const dispatch = useDispatch()
|
||||||
|
|
||||||
const queryParams = new URLSearchParams(location?.search);
|
const queryParams = new URLSearchParams(location?.search);
|
||||||
const codeResponse = queryParams.get("code");
|
const codeResponse = queryParams.get("code");
|
||||||
@@ -37,19 +38,20 @@ function Redirect() {
|
|||||||
userApi
|
userApi
|
||||||
.authStart(reqData)
|
.authStart(reqData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res.data);
|
if (res.status != 200) {
|
||||||
if (res.status != 200 || res.internal_return < 0) {
|
navigate('/login', {replace: true})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
localStorage.setItem("member_id", `${res.data.member_id}`);
|
localStorage.setItem("member_id", `${res.data.member_id}`);
|
||||||
localStorage.setItem("uid", `${res.data.uid}`);
|
localStorage.setItem("uid", `${res.data.uid}`);
|
||||||
localStorage.setItem("session_token", `${res.data.session}`);
|
localStorage.setItem("session_token", `${res.data.session}`);
|
||||||
// localStorage.setItem("session", `${res.data.session}`);
|
|
||||||
dispatch(updateUserDetails({...res.data, loggedIn:true}));
|
dispatch(updateUserDetails({...res.data, loggedIn:true}));
|
||||||
|
navigate('/', {replace: true})
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
navigate('/login', {replace: true})
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
},[])
|
},[])
|
||||||
|
|||||||
@@ -17,21 +17,21 @@ export default function HomeBannerOffersCard(props) {
|
|||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
to={link_result}
|
to={link_result}
|
||||||
className="item w-full block group banner-630-340 bg-cover bg-center"
|
className="item p-2 w-full flex items-center min-h-[340px] bg-alice-blue bg-cover bg-center"
|
||||||
style={{
|
style={{
|
||||||
backgroundImage: `url('${imageUrl}')`,
|
backgroundImage: `url('${imageUrl}')`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="flex flex-col justify-between h-full">
|
<div className="w-[80%] h-full mx-auto flex flex-col justify-between">
|
||||||
<div className="content flex justify-between items-center">
|
<div className="content flex justify-between items-center">
|
||||||
<div className="siderCardHeader">
|
<div className="mb-2">
|
||||||
<h1 className="text-2xl font-bold text-dark-gray dark:text-white tracking-wide">
|
<h1 className="text-2xl lg:text-4xl font-bold text-dark-gray dark:text-white tracking-wide">
|
||||||
<span className="heroSilderTitle">{props.itemData.title}</span>
|
<span className="heroSilderTitle">{props.itemData.title}</span>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col justify-around items-center flex-1">
|
<div className="flex flex-col justify-around items-center flex-1">
|
||||||
<div className="siderCardDescription">
|
<div className="siderCardDescription mb-2">
|
||||||
{props.itemData.description}
|
{props.itemData.description}
|
||||||
</div>
|
</div>
|
||||||
<button className="w-[150px] h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white">
|
<button className="w-[150px] h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white">
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export default function Hero({ className, bannerList, nextDueTask }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`w-full lg:h-[444px] h-full lg:flex lg:p-8 p-4 justify-between items-center lg:space-x-28 rounded-2xl overflow-hidden ${
|
className={`w-full h-full md:grid grid-cols-2 lg:p-8 p-4 justify-between items-center gap-2 rounded-2xl overflow-hidden ${
|
||||||
className || ""
|
className || ""
|
||||||
}`}
|
}`}
|
||||||
style={{
|
style={{
|
||||||
@@ -33,7 +33,7 @@ export default function Hero({ className, bannerList, nextDueTask }) {
|
|||||||
backgroundSize: "cover",
|
backgroundSize: "cover",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="flex-1 h-[330px] lg:h-full flex flex-col justify-between mb-5 lg:mb-0">
|
<div className="h-full flex flex-col justify-between mb-5 lg:mb-0">
|
||||||
{/* heading */}
|
{/* heading */}
|
||||||
<div>
|
<div>
|
||||||
<h1 className="lg:text-2xl text-xl font-medium text-white tracking-wide">
|
<h1 className="lg:text-2xl text-xl font-medium text-white tracking-wide">
|
||||||
@@ -84,7 +84,7 @@ export default function Hero({ className, bannerList, nextDueTask }) {
|
|||||||
)}
|
)}
|
||||||
{/* action */}
|
{/* action */}
|
||||||
<div className="flex lg:space-x-3 space-x-1 items-center">
|
<div className="flex lg:space-x-3 space-x-1 items-center">
|
||||||
<Link to="/mytask" className="text-white text-base sm:block hidden">
|
<Link to="/mytask" className="text-white text-base">
|
||||||
<span className=" border-b dark:border-[#5356fb29] border-white">
|
<span className=" border-b dark:border-[#5356fb29] border-white">
|
||||||
{" "}
|
{" "}
|
||||||
View All Task(s)
|
View All Task(s)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export default function HomeSliders(props) {
|
|||||||
// debugger;
|
// debugger;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="hero-slider relative 2xl:w-[600px] xl:w-[400px] lg:w-[420px] w-full mb-2 lg:mb-0 ">
|
<div className="hero-slider relative h-full w-full mb-2 lg:mb-0">
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<SliderCom settings={props.settings}>
|
<SliderCom settings={props.settings}>
|
||||||
{props.bannerList?.length <= 0 && (
|
{props.bannerList?.length <= 0 && (
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
.heroSilderTitle{
|
.heroSilderTitle{
|
||||||
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
|
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
|
||||||
font-family: sans; color: white;
|
font-family: sans; color: white;
|
||||||
font-size: 42px;
|
|
||||||
font-family: Circular, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;
|
font-family: Circular, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
.back-dark1{
|
.back-dark1{
|
||||||
@@ -52,13 +51,7 @@
|
|||||||
color: white;
|
color: white;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.siderCardHeader{
|
|
||||||
margin: 40px 40px 10px 40px;
|
|
||||||
font-size: 24px;
|
|
||||||
font-weight: bolder;
|
|
||||||
}
|
|
||||||
.siderCardDescription{
|
.siderCardDescription{
|
||||||
margin: 10px 45px 10px 45px;
|
|
||||||
background-color: aliceblue;
|
background-color: aliceblue;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|||||||
Reference in New Issue
Block a user