fix-link removed #5

Merged
suvo merged 1 commits from feat/seo into master 2025-06-10 13:05:44 +00:00
4 changed files with 17 additions and 68 deletions

1
.astro/types.d.ts vendored
View File

@ -1,2 +1 @@
/// <reference types="astro/client" />
/// <reference path="content.d.ts" />

View File

@ -8,56 +8,7 @@ import { store } from "../redux/store";
import { Provider } from "react-redux";
const Blog = (props) => {
// console.log("props in blog", props.blog);
window.scrollTo({ top: 0, behavior: "instant" });
// const { pathname } = useLocation();
// const slug = pathname.split("/")[2];
// const [props.blog, setBlogData] = useState();
// const navigate = useNavigate();
// useEffect(() => {
// fetch(
// `https://curriculum-app-api.beanstalkedu.com/items/blog?filter[status][_eq]=published&filter[property][_eq]=aKadmy&filter[slug][_eq]=${slug}`
// )
// .then((res) => res.json())
// .then((data) => {
// setBlogData(data?.data?.[0]);
// if (data?.data.length === 0) {
// navigate("/404");
// }
// })
// .catch((err) => console.log("err123", err));
// }, [slug]);
// blog
const newSchema =
props.blog && props.blog.schema && props.blog?.schema.replaceAll("\n", "");
const newSchema2 =
props.blog &&
props.blog.schema2 &&
props.blog?.schema2.replaceAll("\n", "");
const newSchema3 =
props.blog &&
props.blog.schema3 &&
props.blog?.schema3.replaceAll("\n", "");
// console.log("blogUrl", `https://akadmyapp.com${pathname}`);
const metaData = {
title: props.blog && props.blog.meta,
description: props.blog && props.blog.meta_description,
// canonical: `https://akadmyapp.com${pathname}`,
og_title: props.blog && props.blog.og_title,
og_desc: props.blog && props.blog.og_desc,
siteName: "aKadmy",
type: "website",
url: "https://akadmyapp.com",
img_url: `https://management.beanstalkedu.com/assets/${
props.blog && props.blog.og_img
}`,
content: "product",
creator: "@aKadmy",
};
return (
<>

View File

@ -5,7 +5,6 @@ import React, { useState } from "react";
import { useSelector } from "react-redux";
import style from "./Header.module.css";
import MenuIcon from "@mui/icons-material/Menu";
import { Link } from "react-router-dom";
const navbar = [
{
@ -68,26 +67,26 @@ function Header({ theme = "LIGHT", color }) {
<div className={style.container}>
<div className={style.menus}>
<div className={style.logo}>
<Link to="/">
<a href="/">
<img
src={"/assets/akademy_Logo.png"}
width={80}
alt="akadmy Logo"
/>
</Link>
</a>
</div>
<div className={style.menus1}>
{navbar.map((item, i) => (
<div key={i} className={`${style.dropdown} ${style.product}`}>
<Link to={item.link} style={{ color: color, fontWeight: 500 }}>
<a href={item.link} style={{ color: color, fontWeight: 500 }}>
{item.name}
</Link>
</a>
{item?.subcat && <ArrowDropDownIcon style={{ color: color }} />}
<div className={style.dropdown_content}>
{item?.subcat?.map((subItem, i) => (
<Link key={i} to={subItem.link}>
<a key={i} href={subItem.link}>
{subItem.name}
</Link>
</a>
))}
</div>
</div>
@ -95,7 +94,7 @@ function Header({ theme = "LIGHT", color }) {
</div>
</div>
<div className={style.menus2}>
<Link to="/purchase/cart">
<a href="/purchase/cart">
<IconButton aria-label="cart" size="large">
<Badge
badgeContent={
@ -108,11 +107,11 @@ function Header({ theme = "LIGHT", color }) {
<ShoppingCartOutlinedIcon style={{ color: color }} />
</Badge>
</IconButton>
</Link>
</a>
</div>
{/* mobile sidebar */}
<div className={style.burger_menu}>
<Link to="/purchase/cart">
<a href="/purchase/cart">
<IconButton aria-label="cart" size="large">
<Badge
badgeContent={
@ -125,7 +124,7 @@ function Header({ theme = "LIGHT", color }) {
<ShoppingCartOutlinedIcon style={{ color: color }} />
</Badge>
</IconButton>
</Link>
</a>
<MenuIcon onClick={() => setOpen(true)} style={{ color: color }} />
{open ? (
<div className={style.sidenav}>
@ -142,15 +141,15 @@ function Header({ theme = "LIGHT", color }) {
sx={{ display: "flex" }}
onClick={() => setActive(item.name)}
>
<Link
to={item.link}
<a
href={item.link}
style={{
color: color === "white" ? "#818181" : color,
fontWeight: 500,
}}
>
{item.name}
</Link>
</a>
{item?.subcat && (
<ArrowDropDownIcon
style={{ color: color === "white" ? "#818181" : color }}
@ -161,15 +160,15 @@ function Header({ theme = "LIGHT", color }) {
{active === item.name ? (
<Box ml={2}>
{item?.subcat?.map((subItem, i) => (
<Link
<a
key={i}
to={subItem.link}
href={subItem.link}
style={{
color: color === "white" ? "#818181" : color,
}}
>
{subItem.name}
</Link>
</a>
))}
</Box>
) : null}

View File

@ -44,7 +44,7 @@ const schema3 = blogData?.schema3?.replaceAll("\n", "");
---
<Layout
title={blogData?.title ?? 'Blog | Akademy'}
description={blogData.meta_description}
description={blogData?.meta_description}
canonicalUrl={`https://akadmyapp.com/blogs/${id}`}
ogImage={`https://management.beanstalkedu.com/assets/${blogData?.og_img}`}
ogUrl={'https://akadmyapp.com'}