Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/projects/builder-mp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/projects/canada-spends.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/projects/exit-tax-calculator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/projects/great-canadian-builders.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/projects/outcomes-tracker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/projects/state-of-the-nation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/projects/tax-visualizer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/projects/trade-barriers-tracker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { MetadataRoute } from "next";
import { fetchBuilders, fetchFeedItems, fetchMemos, fetchPosts, fetchTools } from "@/lib/api";
import { fetchBuilders, fetchFeedItems, fetchMemos, fetchPosts } from "@/lib/api";
import { PROJECTS } from "@/constants/projects";
import { fetchApi } from "@/lib/tracker-api";
import type {
CommitmentsResponse,
Expand Down Expand Up @@ -41,10 +42,9 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
{ url: `${baseUrl}/privacy-notice`, lastModified: new Date(), changeFrequency: "yearly", priority: 0.3 },
];

const tools = await fetchTools();
const staticUrls = new Set(staticPages.map((p) => p.url));
const redirectedPaths = new Set(["/great-canadian-builders", "/toronto"]);
const projectPages: MetadataRoute.Sitemap = tools
const projectPages: MetadataRoute.Sitemap = PROJECTS
.map((t) => {
if (!t.externalUrl) return null;
let path: string | null = null;
Expand Down
10 changes: 5 additions & 5 deletions src/components/ProjectsGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { fetchTools } from "@/lib/api";
import { PROJECTS } from "@/constants/projects";
import WidgetCard from "./widgets/WidgetCard";
import { ProjectData } from "./widgets/types";

export default async function ProjectsGrid({
export default function ProjectsGrid({
featured,
maxItems,
filter,
Expand All @@ -17,9 +17,9 @@ export default async function ProjectsGrid({
includeSlugs?: string[];
columns?: 1 | 2;
}) {
const raw = await fetchTools(featured ? { featured: true } : undefined);

let projects: ProjectData[] = raw;
let projects: ProjectData[] = featured
? PROJECTS.filter((p) => p.featured)
: PROJECTS;

if (includeSlugs?.length) {
projects = includeSlugs
Expand Down
105 changes: 105 additions & 0 deletions src/constants/projects.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import type { ProjectData } from "@/components/widgets/types";

export const PROJECTS: ProjectData[] = [
{
id: "outcomes-tracker",
slug: "outcomes-tracker",
title: "Outcomes Tracker",
description:
"Tracking progress of key government commitments and their impact",
externalUrl: "/tracker",
size: "small",
featured: true,
order: 0,
accentColor: null,
imageUrl: "/projects/outcomes-tracker.png",
},
{
id: "canada-spends",
slug: "canada-spends",
title: "Canada Spends",
description:
"Breaking down government finances to understand how your money is being spent",
externalUrl: "https://canadaspends.com",
size: "small",
featured: false,
order: 1,
accentColor: null,
imageUrl: "/projects/canada-spends.png",
},
{
id: "builder-mp",
slug: "builder-mp",
title: "Builder MP",
description: "What would a Builder think of these parliament bills?",
externalUrl: "https://buildcanada.com/bills",
size: "small",
featured: false,
order: 2,
accentColor: null,
imageUrl: "/projects/builder-mp.png",
},
{
id: "great-canadian-builders",
slug: "great-canadian-builders",
title: "Great Canadian Builders",
description: "Stories of Canadians who have transformed our world",
externalUrl: "/great-canadian-builders",
size: "small",
featured: false,
order: 3,
accentColor: null,
imageUrl: "/projects/great-canadian-builders.png",
},
{
id: "state-of-the-nation",
slug: "state-of-the-nation",
title: "State of the Nation",
description: "Visualize and track key indicators in Canada.",
externalUrl: "/state-of-the-nation",
size: "small",
featured: false,
order: 4,
accentColor: null,
imageUrl: "/projects/state-of-the-nation.png",
},
{
id: "trade-barriers-tracker",
slug: "trade-barriers-tracker",
title: "Trade Barriers Tracker",
description:
"Tracking progress of interprovincial trade agreements across Canada",
externalUrl: "https://buildcanada.com/trade-barriers",
size: "small",
featured: false,
order: 5,
accentColor: null,
imageUrl: "/projects/trade-barriers-tracker.png",
},
{
id: "tax-visualizer",
slug: "tax-visualizer",
title: "Where Your Tax Dollars Go",
description:
"A personalized breakdown of how much you contribute to different government services",
externalUrl: "https://canadaspends.com/tax-visualizer",
size: "small",
featured: false,
order: 6,
accentColor: null,
imageUrl: "/projects/tax-visualizer.png",
},
{
id: "exit-tax-calculator",
slug: "exit-tax-calculator",
title: "Exit Tax Calculator",
description:
"Compare exit scenarios for founders and investors in Canada vs. US",
externalUrl: "https://buildcanada.com/exit-tax-calculator",
size: "small",
featured: false,
order: 7,
accentColor: null,
imageUrl: "/projects/exit-tax-calculator.png",
},
];
1 change: 0 additions & 1 deletion src/lib/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ export { fetchPost, fetchPosts } from "./posts";
export type { PostDetail } from "./posts";
export { fetchTeamMembers } from "./team";
export { fetchTestimonials } from "./testimonials";
export { fetchTools } from "./tools";
export type { SiteConfigData } from "./config";
36 changes: 0 additions & 36 deletions src/lib/api/tools.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/lib/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,6 @@ export interface YFTeamMember {
profile_photo_url: string | null;
}

export interface YFTool {
id: number;
slug: string;
title: string;
description: string | null;
url: string;
featured: boolean;
position: number;
accent_color: string | null;
size: "small" | "big";
image_url: string | null;
}

export interface YFTestimonial {
id: number;
name: string;
Expand Down
Loading