Donation page update and Subscription update on Admin Dashboard
This commit is contained in:
16
src/App.js
16
src/App.js
@@ -24,6 +24,7 @@ import AdminMembers from './pages/admin/AdminMembers';
|
||||
import AdminEvents from './pages/admin/AdminEvents';
|
||||
import AdminApprovals from './pages/admin/AdminApprovals';
|
||||
import AdminPlans from './pages/admin/AdminPlans';
|
||||
import AdminSubscriptions from './pages/admin/AdminSubscriptions';
|
||||
import AdminLayout from './layouts/AdminLayout';
|
||||
import { AuthProvider, useAuth } from './context/AuthContext';
|
||||
import MemberRoute from './components/MemberRoute';
|
||||
@@ -42,6 +43,7 @@ import History from './pages/History';
|
||||
import MissionValues from './pages/MissionValues';
|
||||
import BoardOfDirectors from './pages/BoardOfDirectors';
|
||||
import Donate from './pages/Donate';
|
||||
import DonationSuccess from './pages/DonationSuccess';
|
||||
|
||||
const PrivateRoute = ({ children, adminOnly = false }) => {
|
||||
const { user, loading } = useAuth();
|
||||
@@ -77,7 +79,11 @@ function App() {
|
||||
<ChangePasswordRequired />
|
||||
</PrivateRoute>
|
||||
} />
|
||||
<Route path="/plans" element={<Plans />} />
|
||||
<Route path="/plans" element={
|
||||
<PrivateRoute>
|
||||
<Plans />
|
||||
</PrivateRoute>
|
||||
} />
|
||||
<Route path="/become-a-member" element={<BecomeMember />} />
|
||||
<Route path="/payment-success" element={<PaymentSuccess />} />
|
||||
<Route path="/payment-cancel" element={<PaymentCancel />} />
|
||||
@@ -89,6 +95,7 @@ function App() {
|
||||
|
||||
{/* Donation Page - Public Access */}
|
||||
<Route path="/donate" element={<Donate />} />
|
||||
<Route path="/donation-success" element={<DonationSuccess />} />
|
||||
|
||||
<Route path="/dashboard" element={
|
||||
<PrivateRoute>
|
||||
@@ -209,6 +216,13 @@ function App() {
|
||||
</AdminLayout>
|
||||
</PrivateRoute>
|
||||
} />
|
||||
<Route path="/admin/subscriptions" element={
|
||||
<PrivateRoute adminOnly>
|
||||
<AdminLayout>
|
||||
<AdminSubscriptions />
|
||||
</AdminLayout>
|
||||
</PrivateRoute>
|
||||
} />
|
||||
<Route path="/admin/gallery" element={
|
||||
<PrivateRoute adminOnly>
|
||||
<AdminLayout>
|
||||
|
||||
Reference in New Issue
Block a user