Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
feat: add no index tag
Browse files Browse the repository at this point in the history
  • Loading branch information
0xHieu01 committed Mar 23, 2024
1 parent effb713 commit 093be25
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/containers/Testimonial/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useColorMode } from '@docusaurus/theme-common'
import { Tweet } from 'react-tweet'
import { useEffect } from 'react';

const firstColumn = [
{
Expand Down Expand Up @@ -75,6 +76,18 @@ const fourthColumn = [

const Testimonial = () => {
const { colorMode } = useColorMode()
useEffect(() => {
// Add a noindex meta tag to the document head
const metaTag = document.createElement('meta');
metaTag.name = 'robots';
metaTag.content = 'noindex';
document.head.appendChild(metaTag);

// Clean up function to remove the meta tag when the component unmounts
return () => {
document.head.removeChild(metaTag);
};
}, []);

return (
<div className="bg-[#F0F0F0] dark:bg-[#242424] p-8 mt-10 pb-20">
Expand Down

0 comments on commit 093be25

Please sign in to comment.