(force) Update project: Added 60 new features and made various changes
{warning: this all chnaged}
This commit is contained in:
58
src/layout/LandingLayout.tsx
Normal file
58
src/layout/LandingLayout.tsx
Normal file
@@ -0,0 +1,58 @@
|
||||
import { Helmet } from "react-helmet-async";
|
||||
import Particle from "../components/particle";
|
||||
import { Outlet, useLocation, useNavigate, useParams } from "react-router-dom";
|
||||
import Footer from "../components/footer";
|
||||
import LandingHeader from "../components/landing-header";
|
||||
import { useEffect } from "react";
|
||||
import { setConfigId } from "../redux/slices/configId";
|
||||
import { useDispatch } from "react-redux";
|
||||
|
||||
const LandingLayout = () => {
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
useEffect(() => {
|
||||
if (location.hash === "#shoppingConfig") {
|
||||
navigate("/shopping-config");
|
||||
}
|
||||
}, [location]);
|
||||
|
||||
const { configs } = useParams<{ configs: string }>();
|
||||
const dispatch = useDispatch();
|
||||
console.log(configs)
|
||||
useEffect(() => {
|
||||
if (configs === "1" || configs === "2" || configs === "3") {
|
||||
dispatch(setConfigId(configs))
|
||||
}
|
||||
}, [configs]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Helmet>
|
||||
<title>پرشین پینگ | Persian Ping</title>
|
||||
<meta
|
||||
name="description"
|
||||
content="بهترین خدمات فروشگاه جم و سی پی برای بازیهای آنلاین با پرشین پینگ"
|
||||
/>
|
||||
<meta
|
||||
name="keywords"
|
||||
content="پرشین پینگ, خدمات بازی, بازی آنلاین, خرید یوسی پابجی موبایل"
|
||||
/>
|
||||
</Helmet>
|
||||
|
||||
<Particle />
|
||||
<div className={`relative bg-noisy w-full min-h-screen`}>
|
||||
<div className="relative max-w-[1400px] mx-auto h-full flex flex-col justify-between">
|
||||
<div className="relative w-full h-full">
|
||||
<LandingHeader />
|
||||
<main className="w-full h-full px-5 py-0">
|
||||
<Outlet />
|
||||
</main>
|
||||
</div>
|
||||
<Footer />
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default LandingLayout;
|
||||
@@ -11,8 +11,9 @@ const Layout = () => {
|
||||
const { configs } = useParams<{ configs: string }>();
|
||||
const dispatch = useDispatch();
|
||||
useEffect(() => {
|
||||
if (configs === "1" || configs === "2" || configs === "3")
|
||||
if (configs === "1" || configs === "2" || configs === "3") {
|
||||
dispatch(setConfigId(configs));
|
||||
}
|
||||
if (configs)
|
||||
setTimeout(() => {
|
||||
const element = document.getElementById("configs");
|
||||
|
||||
Reference in New Issue
Block a user