Skip to content

Commit

Permalink
Updated urls and changed name of default function components
Browse files Browse the repository at this point in the history
  • Loading branch information
jennymar committed May 16, 2024
1 parent 3f796e4 commit fdc8c3f
Show file tree
Hide file tree
Showing 22 changed files with 27 additions and 31 deletions.
8 changes: 4 additions & 4 deletions frontend/src/app/admin/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ export default function Dashboard() {
<div className={styles.gridContainer}>
<DashboardCard
imageURI="/dashboard_eventcreator.png"
url="/eventcreator"
url="/event-creator"
title="Event Creator"
last_updated="Month XX, XXXX, XX:XX"
/>
<DashboardCard
imageURI="/dashboard_pageeditor.png"
url="/pageeditor"
url="/page-editor"
title="Page Editor"
last_updated="Month XX, XXXX, XX:XX"
/>

<DashboardCard
imageURI="/dashboard_newsletter.png"
url="/newslettercreator"
url="/newsletter-creator"
title="Newsletter"
last_updated="Month XX, XXXX, XX:XX"
/>

<DashboardCard
imageURI="/dashboard_mailinglist.png"
url="/mailinglist"
url="/mailing-list"
title="Mailing List"
last_updated="Month XX, XXXX, XX:XX"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import CancelButton from "@/components/CancelButton";
import Collapsable from "@/components/Collapsable";
import PageToggle from "@/components/PageToggle";

// import PageEditorCard from "@/components/PageEditorCard";

export default function Dashboard() {
export default function AboutEditor() {
const [isEdited, setIsEdited] = useState(false);
const [phSubtitle, setPhSubtitle] = useState<string>("");
const [s1Subtitle, setS1Subtitle] = useState<string>("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import CancelButton from "@/components/CancelButton";
import Collapsable from "@/components/Collapsable";
import PageToggle from "@/components/PageToggle";

// import PageEditorCard from "@/components/PageEditorCard";

export default function Dashboard() {
export default function ContactEditor() {
const [isEdited, setIsEdited] = useState(false);

const handleEdit = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Collapsable from "@/components/Collapsable";
import PageToggle from "@/components/PageToggle";
import { WarningModule } from "@/components/WarningModule";

export default function EventsPageEditor() {
export default function EventsEditor() {
const [isEdited, setIsEdited] = useState(false);
const [phSubtitle, setPhSubtitle] = useState<string>("");
const [s1Title, setS1Title] = useState<string>("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import PageToggle from "@/components/PageToggle";

// import PageEditorCard from "@/components/PageEditorCard";

export default function Dashboard() {
export default function HomeEditor() {
const [isEdited, setIsEdited] = useState(false);
const [phSubtitle, setPhSubtitle] = useState<string>("");
const [s1Subtitle, setS1Subtitle] = useState<string>("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import PageToggle from "@/components/PageToggle";

// import PageEditorCard from "@/components/PageEditorCard";

export default function Dashboard() {
export default function ImpactEditor() {
const [isEdited, setIsEdited] = useState(false);

const [phSubtitle, setPhSubtitle] = useState<string>("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Collapsable from "@/components/Collapsable";
import PageToggle from "@/components/PageToggle";
import { WarningModule } from "@/components/WarningModule";

export default function Dashboard() {
export default function InvolvedEditor() {
const [isEdited, setIsEdited] = useState(false);
const [phSubtitle, setPhSubtitle] = useState<string>("");
const [s1Subtitle, setS1Subtitle] = useState<string>("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import PageToggle from "@/components/PageToggle";

// import PageEditorCard from "@/components/PageEditorCard";

export default function Dashboard() {
export default function MissionEditor() {
const [isEdited, setIsEdited] = useState(false);
const [valueSubtitle, setvalueSubtitle] = useState<string>("");
const [phSubtitle, setPhSubtitle] = useState<string>("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import PageToggle from "@/components/PageToggle";

// import PageEditorCard from "@/components/PageEditorCard";

export default function Dashboard() {
export default function NewsletterEditor() {
const [isEdited, setIsEdited] = useState(false);
const [phSubtitle, setPhSubtitle] = useState<string>("");
const [s1Subtitle, setS1Subtitle] = useState<string>("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@ import styles from "./page.module.css";

import PageEditorCard from "@/components/PageEditorCard";

export default function Dashboard() {
export default function PageEditorDashboard() {
return (
<main className={styles.page}>
<div className={styles.gridContainer}>
<PageEditorCard
imageURI="/impact_bg.png"
url="/pageeditor/home"
url="/page-editor/home"
title="Home"
last_updated="Month XX, XXXX, XX:XX"
/>
<PageEditorCard
imageURI="/impact_bg.png"
url="/pageeditor/about"
url="/page-editor/about"
title="About Us"
last_updated="Month XX, XXXX, XX:XX"
/>
<PageEditorCard
imageURI="/impact_bg.png"
url="/pageeditor/involved"
url="/page-editor/involved"
title="Get Involved"
last_updated="Month XX, XXXX, XX:XX"
/>
<PageEditorCard
imageURI="/impact_bg.png"
url="/pageeditor/impact"
url="/page-editor/impact"
title="Our Impact"
last_updated="Month XX, XXXX, XX:XX"
/>
<PageEditorCard
imageURI="/impact_bg.png"
url="/pageeditor/donate"
url="/page-editor/donate"
title="Donate"
last_updated="Month XX, XXXX, XX:XX"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import PageToggle from "@/components/PageToggle";

// import PageEditorCard from "@/components/PageEditorCard";

export default function Dashboard() {
export default function TeamEditor() {
const [isEdited, setIsEdited] = useState(false);
const handleEdit = () => {
setIsEdited(true);
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/components/NavigationBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const NavigationBar = () => {
const url = window.location.pathname;
if (url === "/admin/dashboard") {
return "Dashboard";
} else if (url === "/admin/eventcreator") {
} else if (url === "/admin/event-creator") {
return "Event Creator";
} else if (url.startsWith("/admin/pageeditor")) {
} else if (url.startsWith("/admin/page-editor")) {
// For Page Editor subpages
if (url.endsWith("home")) {
setActivePageEditor("Home");
Expand All @@ -39,9 +39,9 @@ const NavigationBar = () => {
setActivePageEditor("Upcoming Events");
}
return "Page Editor";
} else if (url === "/admin/newslettercreator") {
} else if (url === "/admin/newsletter-creator") {
return "Newsletter Creator";
} else if (url === "/admin/mailinglist") {
} else if (url === "/admin/mailing-list") {
return "Mailing List";
} else if (url === "/admin/settings") {
return "Settings";
Expand Down Expand Up @@ -110,7 +110,7 @@ const NavigationBar = () => {
<div className={activeMenu === "Event Creator" ? styles.menuActive : styles.menuDiv}>
<Image width={18} height={18} src="/calendarIcon.svg" alt="Calendar Icon" />
<Link
href="/admin/eventcreator"
href="/admin/event-creator"
onClick={() => {
handleOnClick("Event Creator");
}}
Expand All @@ -121,7 +121,7 @@ const NavigationBar = () => {
<div className={activeMenu === "Page Editor" ? styles.menuActive : styles.menuDiv}>
<Image width={18} height={18} src="/pageIcon.svg" alt="Page Icon" />
<Link
href="/admin/pageeditor"
href="/admin/page-editor"
onClick={() => {
handleOnClick("Page Editor");
}}
Expand All @@ -132,7 +132,7 @@ const NavigationBar = () => {
<div className={activeMenu === "Newsletter Creator" ? styles.menuActive : styles.menuDiv}>
<Image width={18} height={18} src="/newsletterIcon.svg" alt="Newsletter Icon" />
<Link
href="/admin/newslettercreator"
href="/admin/newsletter-creator"
onClick={() => {
handleOnClick("Newsletter Creator");
}}
Expand All @@ -143,7 +143,7 @@ const NavigationBar = () => {
<div className={activeMenu === "Mailing List" ? styles.menuActive : styles.menuDiv}>
<Image width={18} height={18} src="/mailIcon.svg" alt="Mail Icon" />
<Link
href="/admin/mailinglist"
href="/admin/mailing-list"
onClick={() => {
handleOnClick("Mailing List");
}}
Expand Down

0 comments on commit fdc8c3f

Please sign in to comment.