Skip to content

Commit

Permalink
renamed for better readability
Browse files Browse the repository at this point in the history
  • Loading branch information
babakamyljanovssw committed Dec 9, 2024
1 parent aada6d3 commit fbc406e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/offices/[filename]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Image from "next/image";
import { tinaField } from "tinacms/dist/react";
import { TinaMarkdown } from "tinacms/dist/rich-text";

export default function OfficesPage({ props, tinaProps }) {
export default function OfficePage({ props, tinaProps }) {
const { data } = tinaProps;

return (
Expand Down
6 changes: 3 additions & 3 deletions app/offices/[filename]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useSEO } from "@/hooks/useSeo";
import client from "@/tina/client";
import { TODAY } from "hooks/useFetchEvents";
import { Metadata } from "next";
import OfficesPage from ".";
import OfficePage from ".";
import { TinaClient } from "../../tina-client";

const getData = async (filename: string) => {
Expand Down Expand Up @@ -66,12 +66,12 @@ export async function generateStaticParams() {
return pages;
}

export default async function Offices({
export default async function Office({
params,
}: {
params: { filename: string };
}) {
const { filename } = params;
const { props } = await getData(filename);
return <TinaClient props={props} Component={OfficesPage} />;
return <TinaClient props={props} Component={OfficePage} />;
}
2 changes: 1 addition & 1 deletion app/offices/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Container } from "@/components/util/container";
import Image from "next/image";
import { Breadcrumbs } from "../components/breadcrumb";

export default function OfficeIndexPage({ tinaProps }) {
export default function OfficesPage({ tinaProps }) {
const { data } = tinaProps;
const offices = data.officeIndex.officesIndex?.map((office) => office.office);

Expand Down
6 changes: 3 additions & 3 deletions app/offices/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TODAY } from "@/hooks/useFetchEvents";
import { useSEO } from "@/hooks/useSeo";
import client from "@/tina/client";
import { Metadata } from "next";
import OfficeIndexPage from ".";
import OfficesPage from ".";
import { TinaClient } from "../tina-client";

export async function generateMetadata(): Promise<Metadata> {
Expand Down Expand Up @@ -37,7 +37,7 @@ const getData = async () => {
};
};

export default async function OfficePage() {
export default async function Offices() {
const { props } = await getData();
return <TinaClient props={props} Component={OfficeIndexPage} />;
return <TinaClient props={props} Component={OfficesPage} />;
}

0 comments on commit fbc406e

Please sign in to comment.