Skip to content

Commit

Permalink
fix(templates): fix tags urls (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
guyb1 authored Nov 14, 2024
1 parent 07d3745 commit fe8b9f9
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 18 deletions.
8 changes: 5 additions & 3 deletions src/pages/templates-page/templates-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,12 @@ const TemplatesPageComponent: React.FC = () => {
className="mt-1 shrink-0"
items={allTags.map((currentTag) => ({
title: currentTag,
href: `/templates/tags/${currentTag.toLowerCase()}`,
href: `/templates/tags/${currentTag.toLowerCase().replace(/ /g, '-')}`,
selected:
tag?.toLowerCase() ===
currentTag.toLocaleLowerCase(),
tag
?.toLowerCase()
.replace(/-/g, ' ') ===
currentTag.toLowerCase(),
}))}
/>
) : null}
Expand Down
2 changes: 1 addition & 1 deletion src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const routes: RouteObject[] = [
},
loader: async ({ params }): Promise<TemplatesPageLoaderData> => {
const { tags, templates } = await getTemplatesAndAllTags({
tag: params.tag,
tag: params.tag?.replace(/-/g, ' '),
});

return {
Expand Down
2 changes: 1 addition & 1 deletion src/templates-data/templates/adonis-acl-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const adonisAclDb: Template = {
image,
imageDark,
tags: ['Postgres', 'Open Source', 'Node.js'],
featured: true,
featured: false,
url: 'https://github.com/enniel/adonis-acl',
diagram: {
id: 'adonis_acl_db',
Expand Down
2 changes: 1 addition & 1 deletion src/templates-data/templates/akaunting-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const akauntingDb: Template = {
image,
imageDark,
tags: ['Postgres', 'Open Source', 'Laravel', 'PHP'],
featured: true,
featured: false,
url: 'https://github.com/akaunting/akaunting',
diagram: {
id: 'akaunting_db',
Expand Down
2 changes: 1 addition & 1 deletion src/templates-data/templates/buddypress-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const buddypressDb: Template = {
image,
imageDark,
tags: ['Postgres', 'Open Source', 'WordPress'],
featured: true,
featured: false,
url: 'https://buddypress.org',
diagram: {
id: 'buddypress_db',
Expand Down
4 changes: 2 additions & 2 deletions src/templates-data/templates/comfortable-mexican-sofa-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import imageDark from '@/assets/templates/comfortable-mexican-sofa-db-dark.png';

export const ComfortableMexicanSofaDb: Template = {
slug: 'comfortable-mexican-sofa-database',
name: 'ComfortableMexicanSofa',
name: 'Comfortable Mexican Sofa',
shortDescription: 'Rails CMS - ComfortableMexicanSofa',
description:
'A powerful Ruby on Rails 5.2+ CMS (Content Management System) Engine',
image,
imageDark,
tags: ['Postgres', 'Open Source', 'Rails', 'CMS'],
featured: true,
featured: false,
url: 'https://github.com/comfy/comfortable-mexican-sofa',
diagram: {
id: 'comfortable_mexican_sofa_db',
Expand Down
2 changes: 1 addition & 1 deletion src/templates-data/templates/gravity-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const gravityDb: Template = {
image,
imageDark,
tags: ['Postgres', 'SaaS', 'Node.js'],
featured: true,
featured: false,
url: 'https://usegravity.app',
diagram: {
id: 'gravity_db',
Expand Down
2 changes: 1 addition & 1 deletion src/templates-data/templates/koel-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const koelDb: Template = {
image,
imageDark,
tags: ['Postgres', 'Open Source', 'Laravel', 'PHP'],
featured: true,
featured: false,
url: 'https://koel.dev',
diagram: {
id: 'koel_db',
Expand Down
2 changes: 1 addition & 1 deletion src/templates-data/templates/laravel-permission-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const laravelPermissionDb: Template = {
image,
imageDark,
tags: ['Postgres', 'Open Source', 'Laravel', 'PHP'],
featured: true,
featured: false,
url: 'https://github.com/spatie/laravel-permission',
diagram: {
id: 'laravel_permission_db',
Expand Down
2 changes: 1 addition & 1 deletion src/templates-data/templates/laravel-spark-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const laravelSparkDb: Template = {
image,
imageDark,
tags: ['Postgres', 'Open Source', 'Laravel', 'PHP'],
featured: true,
featured: false,
url: 'https://github.com/laravel/spark-aurelius',
diagram: {
id: 'laravel_spark_db',
Expand Down
2 changes: 1 addition & 1 deletion src/templates-data/templates/lobsters-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const lobstersDb: Template = {
image,
imageDark,
tags: ['Postgres', 'Example Apps'],
featured: true,
featured: false,
url: 'https://github.com/SukhjinderArora/lobsters-clone',
diagram: {
id: 'lobsters_db',
Expand Down
2 changes: 1 addition & 1 deletion src/templates-data/templates/snipe-it-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const snipeItDb: Template = {
image,
imageDark,
tags: ['Postgres', 'Open Source', 'Laravel', 'PHP'],
featured: true,
featured: false,
url: 'https://github.com/snipe/snipe-it',
diagram: {
id: 'snipe_it_db',
Expand Down
2 changes: 1 addition & 1 deletion src/templates-data/templates/ticketit-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const ticketitDb: Template = {
image,
imageDark,
tags: ['Postgres', 'Open Source', 'Laravel', 'PHP'],
featured: true,
featured: false,
url: 'https://github.com/spatie/ticketit',
diagram: {
id: 'ticketit_db',
Expand Down
2 changes: 1 addition & 1 deletion src/templates-data/templates/visual-novel-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const visualNovelDb: Template = {
image,
imageDark,
tags: ['Postgres', 'Visual Novel Database'],
featured: true,
featured: false,
url: 'https://vndb.org',
diagram: {
id: 'visual_novel_db',
Expand Down
2 changes: 1 addition & 1 deletion src/templates-data/templates/voyager-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const voyagerDb: Template = {
image,
imageDark,
tags: ['Postgres', 'Open Source', 'Laravel', 'PHP'],
featured: true,
featured: false,
url: 'https://voyager.devdojo.com',
diagram: {
id: 'voyager_db',
Expand Down

0 comments on commit fe8b9f9

Please sign in to comment.