Skip to content

Commit 41831df

Browse files
authored
Merge pull request #537 from Shariq2003/JSON_GrowthPage
Added JSON Server Support in the Growth Page | Issue #493
2 parents e95dfc6 + a224014 commit 41831df

File tree

4 files changed

+95
-1
lines changed

4 files changed

+95
-1
lines changed

PROJECT_STRUCTURE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@
409409
│ │ ├── hover-card.jsx
410410
│ │ ├── input.jsx
411411
│ │ ├── label.jsx
412+
│ │ ├── loading.jsx
412413
│ │ ├── menubar.jsx
413414
│ │ ├── navigation-menu.jsx
414415
│ │ ├── notification.jsx

data.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48247,5 +48247,77 @@
4824748247
]
4824848248
}
4824948249
}
48250+
],
48251+
"overviewProducts":[
48252+
{
48253+
"title": "Google Play",
48254+
"description": "Publish your apps and games, grow your audience, boost engagement, and earn revenue.",
48255+
"image": "/gro1.png"
48256+
},
48257+
{
48258+
"title": "Google AdMob",
48259+
"description": "Monetize mobile apps with targeted, in-app advertising that respects user experience.",
48260+
"image": "/gro2.png"
48261+
},
48262+
{
48263+
"title": "Google Ads",
48264+
"description": "Promote your website, products, and app to the right users with Google Ads.",
48265+
"image": "/gro3.svg"
48266+
},
48267+
{
48268+
"title": "Firebase",
48269+
"description": "An app development platform that helps you build and grow apps and games users love.",
48270+
"image": "/gro4.svg"
48271+
}
48272+
],
48273+
"allProducts":[
48274+
{
48275+
"title": "Firebase In-App Messaging",
48276+
"description": "Firebase In-App Messaging helps you engage your app's active users by sending them targeted, contextual messages that encourage them to use key app features."
48277+
},
48278+
{
48279+
"title": "Firebase Cloud Messaging",
48280+
"description": "Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost."
48281+
},
48282+
{
48283+
"title": "Chrome Extensions",
48284+
"description": "Learn how to develop Chrome extensions."
48285+
},
48286+
{
48287+
"title": "Google Ads API",
48288+
"description": "Build tools to manage large Google Ads accounts and campaigns."
48289+
},
48290+
{
48291+
"title": "Privacy Sandbox",
48292+
"description": "Privacy-focused APIs and updates for cookies, advertising, identity, personalization, and fraud prevention."
48293+
},
48294+
{
48295+
"title": "Google Play's billing system",
48296+
"description": "Google Play’s billing system Sell digital in-app products and subscriptions in your app."
48297+
},
48298+
{
48299+
"title": "Distribute Your Apps & Games on Google Play",
48300+
"description": "Utilize Google Play to distribute your apps and games, which has the ability to reach over 2 billion Android devices and increase total app downloads."
48301+
},
48302+
{
48303+
"title": "Google Play Console",
48304+
"description": "Publish your apps and games with Google Play Console and grow your business on Google Play."
48305+
},
48306+
{
48307+
"title": "Interactive Media Ads SDKs",
48308+
"description": "The IMA SDKs enable publishers to monetize video, audio, or gaming content with video advertising."
48309+
},
48310+
{
48311+
"title": "AdSense",
48312+
"description": "Google AdSense provides a free, flexible way to earn money from your websites, mobile sites, and site search results."
48313+
},
48314+
{
48315+
"title": "Google Ads",
48316+
"description": "Create and manage ads that reach users looking for your products or services on Google Search, Display, YouTube, and more."
48317+
},
48318+
{
48319+
"title": "AdMob",
48320+
"description": "Discover how to monetize your mobile apps with targeted in-app advertising that matches criteria you set."
48321+
}
4825048322
]
4825148323
}

repo_structure.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@
405405
│ │ ├── hover-card.jsx
406406
│ │ ├── input.jsx
407407
│ │ ├── label.jsx
408+
│ │ ├── loading.jsx
408409
│ │ ├── menubar.jsx
409410
│ │ ├── navigation-menu.jsx
410411
│ │ ├── notification.jsx

src/app/(pages)/growth/page.jsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
11
'use client';
2-
import React, { useState } from 'react';
2+
import React, { useState, useEffect } from 'react';
33
import { motion } from 'framer-motion';
44
import { Search } from 'lucide-react';
55
import ProductsNavbar from '../../../components/Global/ProductsNavbar';
66

77
// Growth and Monetization Page Component
88
const GrowthMonetizationPage = () => {
99
const [selectedTab, setSelectedTab] = useState("Growth and monetization");
10+
const [overviewProducts, setOverviewProducts] = useState([]);
11+
const [allProducts, setAllProducts] = useState([]);
12+
13+
useEffect(() => {
14+
const fetchProducts = async () => {
15+
try {
16+
const overviewResponse = await fetch('http://localhost:5000/overviewProducts');
17+
const allResponse = await fetch('http://localhost:5000/allProducts');
18+
const overviewData = await overviewResponse.json();
19+
const allData = await allResponse.json();
20+
21+
setOverviewProducts(overviewData);
22+
setAllProducts(allData);
23+
} catch (error) {
24+
console.error('Error fetching product data:', error);
25+
}
26+
};
27+
28+
fetchProducts();
29+
}, []);
1030

1131
return (
1232
<div className="bg-white text-black">

0 commit comments

Comments
 (0)