Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Franpastoragusti committed Jul 9, 2024
1 parent a534b91 commit b76605a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 5 additions & 5 deletions packages/nextjs/app/project/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import CustomButton from "~~/components/onchain-impact-dashboard/CustomButton";
import { ProjectTotalsComponent } from "~~/components/onchain-impact-dashboard/projectTotalsComponent/projectTotalsComponent";
import { ProjectService } from "~~/services/onchainImpactDashboardApi/projectService";

// export async function generateStaticParams() {
// const { getProjectIds } = ProjectService();
// const projectIds = await getProjectIds();
// return projectIds.map(id => ({ id }));
// }
export async function generateStaticParams() {
const { getProjectIds } = ProjectService();
const projectIds = await getProjectIds();
return projectIds.map(id => ({ id }));
}

const ProjectDetail: NextPage<{ params: { id: string } }> = async ({ params }) => {
const { getProjectById } = ProjectService();
Expand Down
6 changes: 2 additions & 4 deletions packages/nextjs/utils/onchainImpactDashboard/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ export const getTargetDate = (date: Date, filter: string) => {
};

export const formatDate = (dateString: string) => {
const year = dateString.slice(0, 4);
const month = dateString.slice(4, 6);
const day = dateString.slice(6, 8);
return `${year}/${month}/${day}`;
const date = new Date(dateString).toDateString();
return `${date}`;
};

const hashString = (str: string) => {
Expand Down

0 comments on commit b76605a

Please sign in to comment.