Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kawtar Choubari committed Sep 17, 2023
2 parents 555b555 + dc50c95 commit 0521f71
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 19 deletions.
7 changes: 2 additions & 5 deletions app/creator/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import SenjaSocialGrid from "@/components/senja-social-grid";
import SocialsCard from "@/components/socials-card";
import {
getFacebookFollowers,
Expand Down Expand Up @@ -71,11 +72,7 @@ export default async function Creator() {
/>
))}
</div>
<div
className="senja-embed"
data-id="48bd35bb-286e-4df6-84bd-9476d602681f"
data-lazyload="false"
></div>
<SenjaSocialGrid />
</div>
);
}
12 changes: 0 additions & 12 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Providers } from "@/lib/provider";
import Footer from "@/components/footer";
import { siteConfig } from "@/config/site";
import Analytics from "@/components/analytics";
import Script from "next/script";

export const metadata = {
title: siteConfig.name,
Expand Down Expand Up @@ -92,17 +91,6 @@ export default function RootLayout({
data-y_margin="18"
strategy="lazyOnload"
></Script> */}
<Script
async
type="text/javascript"
src="https://static.senja.io/dist/platform.js"
></Script>
<Script
type="text/javascript"
async
src="https://embeds.beehiiv.com/attribution.js"
strategy="lazyOnload"
></Script>
</body>
</html>
);
Expand Down
7 changes: 5 additions & 2 deletions app/robots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ import { allPosts } from "contentlayer/generated";

export default function robots(): MetadataRoute.Robots {
// Find all unpublished posts.
const disallowedPaths = allPosts
const disallowedPosts = allPosts
.filter((post) => !post.published)
.map((post) => `/${post.slugAsParams}`);
.map((post) => `${post.slug}`);

const disallowedPaths = [...disallowedPosts, "/api/contact"];

return {
sitemap: "/sitemap.xml",
rules: {
userAgent: "*",
allow: "/",
Expand Down
7 changes: 7 additions & 0 deletions components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,20 @@ import { Logo } from "./logo";
import Link from "next/link";
import NewsletterBox from "./newsletter-box";
import { SiGithub, SiNextdotjs, SiTailwindcss, SiVercel } from "react-icons/si";
import Script from "next/script";

export default function Footer() {
return (
<footer
role="contentinfo"
className="bg-lighter dark:bg-dark text-darker dark:text-light py-4 mt-20 w-full"
>
<Script
type="text/javascript"
async
src="https://embeds.beehiiv.com/attribution.js"
strategy="lazyOnload"
></Script>
<div className="mx-auto px-8 pt-5 lg:px-8 lg:max-w-7xl grid grid-cols-1 md:grid-cols-12 gap-8">
<div className="md:col-span-4 md:space-y-4">
<Link href="/" aria-label="Choubari's Home Page">
Expand Down
19 changes: 19 additions & 0 deletions components/senja-social-grid.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import Script from "next/script";

export default function SenjaSocialGrid() {
return (
<>
<Script
async
type="text/javascript"
src="https://static.senja.io/dist/platform.js"
strategy="lazyOnload"
></Script>
<div
className="senja-embed"
data-id="48bd35bb-286e-4df6-84bd-9476d602681f"
data-lazyload="false"
></div>
</>
);
}

0 comments on commit 0521f71

Please sign in to comment.