From 55aed6d7c2df0daedbdabea0d1727acb1815ce2b Mon Sep 17 00:00:00 2001 From: Biswakalyan Bhuyan Date: Fri, 26 Jul 2024 21:21:03 +0530 Subject: added upload feature --- src/pages/ManageAds.jsx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/pages') diff --git a/src/pages/ManageAds.jsx b/src/pages/ManageAds.jsx index 834a898..88fc3b0 100644 --- a/src/pages/ManageAds.jsx +++ b/src/pages/ManageAds.jsx @@ -1,6 +1,7 @@ import React, { useState, useEffect } from 'react'; import AdCard from '../components/AdCard'; import AdForm from '../components/AdForm'; +import UploadForm from '../components/UploadForm'; import { fetchAds, addAd } from '../utils/api'; const ManageAds = () => { @@ -19,10 +20,16 @@ const ManageAds = () => { setAds([...ads, ad]); }; + const handleUploadComplete = (url) => { + console.log('Uploaded file URL:', url); + // You can add logic here to save the uploaded file URL to your backend if needed + }; + return (

Manage Ads

+
{ads.map((ad) => ( -- cgit v1.2.3-59-g8ed1b