Skip to content

Commit

Permalink
Random rating
Browse files Browse the repository at this point in the history
  • Loading branch information
SH20RAJ authored Mar 27, 2024
1 parent b4ee884 commit adf622a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/[...slug]/layout.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
const randomRating = parseFloat((Math.random() * (5.0 - 1.0) + 1.0).toFixed(1));
const randomNumber = Math.floor(Math.random() * 10000) + 1;

// export const metadata = {
// title: "op - Programming Related Articles",
// description: "Get Programming Related Articles on Daily Basis on DevArt a better place to spend time....",
Expand Down Expand Up @@ -57,8 +60,8 @@ export default async function RootLayout(pr) {
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.8",
"reviewCount": "7462",
"ratingValue": randomRating,
"reviewCount": randomNumber,
"bestRating": "5",
"worstRating": "1"
}
Expand Down

0 comments on commit adf622a

Please sign in to comment.