From 37ddb3ca0331dfb524caf2aa6c9c7f976c35dee9 Mon Sep 17 00:00:00 2001 From: Marcelo Santos <117441129+marcelo-m7@users.noreply.github.com> Date: Tue, 18 Nov 2025 00:37:02 +0000 Subject: [PATCH] Revert "Fix favicon and add GitHub links to solution cards" --- index.html | 3 --- src/lib/solutions.ts | 37 +------------------------ src/pages/Projects.tsx | 41 ---------------------------- src/pages/Solutions.tsx | 43 +---------------------------- src/pages/solutions/[slug].tsx | 49 +--------------------------------- src/types/solutions.ts | 2 -- 6 files changed, 3 insertions(+), 172 deletions(-) diff --git a/index.html b/index.html index 4a21164..f1da896 100644 --- a/index.html +++ b/index.html @@ -9,10 +9,7 @@ content="Democratizing innovation through inclusive, accessible solutions that empower diverse communities and promote social equity." /> - - - { - if (!value) { - return null; - } - - const trimmed = value.trim(); - if (!trimmed) { - return null; - } - - const normalized = /^https?:\/\//i.test(trimmed) - ? trimmed - : `https://${trimmed}`; - - try { - const url = new URL(normalized); - if (!['http:', 'https:'].includes(url.protocol)) { - return null; - } - - return url.toString(); - } catch { - return null; - } -}; - const uniqueNonEmpty = (values: Array): string[] => { const seen = new Set(); const result: string[] = []; @@ -140,14 +114,12 @@ const buildFeatureList = ( ? uniqueNonEmpty(repository.topics) : []; - const homepageUrl = sanitizeUrl(repository.homepage); - const formattedUpdatedAt = formatDate(repository.updated_at ?? repository.pushed_at) ?? undefined; const metadata = uniqueNonEmpty([ repository.language ? `Built with ${repository.language}.` : null, - homepageUrl ? `Live project: ${homepageUrl}` : null, + repository.homepage ? `Live project: ${repository.homepage}` : null, repository.stargazers_count > 0 ? `${repository.stargazers_count} ⭐ stars on GitHub` : null, @@ -181,9 +153,6 @@ export const mapGitHubRepoToContent = ( const description = repository.description?.trim(); - const repositoryUrl = sanitizeUrl(repository.html_url) ?? repository.html_url; - const websiteUrl = sanitizeUrl(repository.homepage); - return { id: String(repository.id), title: fallback?.title ?? repository.name, @@ -196,8 +165,6 @@ export const mapGitHubRepoToContent = ( imageUrl: fallback?.imageUrl ?? null, features: buildFeatureList(repository, fallback), gradient, - repositoryUrl, - websiteUrl, }; }; @@ -229,8 +196,6 @@ export const mapSupabaseSolutionToContent = ( imageUrl: solution.image_url ?? fallback?.imageUrl ?? null, features, gradient, - repositoryUrl: fallback?.repositoryUrl ?? null, - websiteUrl: fallback?.websiteUrl ?? null, }; }; diff --git a/src/pages/Projects.tsx b/src/pages/Projects.tsx index 50500a9..649e381 100644 --- a/src/pages/Projects.tsx +++ b/src/pages/Projects.tsx @@ -316,47 +316,6 @@ const Projects = () => { )} - {(solution.repositoryUrl || solution.websiteUrl) && ( - - {solution.repositoryUrl && ( - - - - {t('projects.viewGithub')} - - - )} - {solution.websiteUrl && ( - - - - {t('projects.liveDemo')} - - - )} - - )} - { )} - {(solution.repositoryUrl || solution.websiteUrl) && ( - - {solution.repositoryUrl && ( - - - - {t('projects.viewGithub')} - - - )} - {solution.websiteUrl && ( - - - - {t('projects.liveDemo')} - - - )} - - )} - { - - {(displaySolution.repositoryUrl || displaySolution.websiteUrl) && ( - - {displaySolution.repositoryUrl && ( - - - - {t('projects.viewGithub')} - - - )} - {displaySolution.websiteUrl && ( - - - - {t('projects.liveDemo')} - - - )} - - )} {displaySolution.imageUrl && ( diff --git a/src/types/solutions.ts b/src/types/solutions.ts index 4b68db7..152eb69 100644 --- a/src/types/solutions.ts +++ b/src/types/solutions.ts @@ -6,6 +6,4 @@ export interface SolutionContent { imageUrl?: string | null; features: string[]; gradient: string; - repositoryUrl?: string | null; - websiteUrl?: string | null; }