Skip to content

Commit 1f712d9

Browse files
jankeromnesroboquat
authored andcommitted
[dashboard] Prefer project.slug over project.name in Projects page links
1 parent 50e3e0d commit 1f712d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/dashboard/src/projects/Projects.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,13 @@ export default function () {
184184
</div>
185185
<div className="h-10 px-6 py-1 text-gray-400 text-sm">
186186
<span className="hover:text-gray-600 dark:hover:text-gray-300">
187-
<Link to={`/${teamOrUserSlug}/${p.name}`}>
187+
<Link to={`/${teamOrUserSlug}/${p.slug || p.name}`}>
188188
Branches
189189
</Link>
190190
</span>
191191
<span className="mx-2 my-auto">·</span>
192192
<span className="hover:text-gray-600 dark:hover:text-gray-300">
193-
<Link to={`/${teamOrUserSlug}/${p.name}/prebuilds`}>
193+
<Link to={`/${teamOrUserSlug}/${p.slug || p.name}/prebuilds`}>
194194
Prebuilds
195195
</Link>
196196
</span>
@@ -199,13 +199,13 @@ export default function () {
199199
<div className="h-10 px-4 border rounded-b-xl dark:border-gray-800 bg-gray-100 border-gray-100 dark:bg-gray-800">
200200
{lastPrebuilds.get(p.id)
201201
? (<div className="flex flex-row h-full text-sm space-x-4">
202-
<Link to={`/${teamOrUserSlug}/${p.name}/${lastPrebuilds.get(p.id)?.info?.id}`} className="flex-grow flex items-center group space-x-2 truncate">
202+
<Link to={`/${teamOrUserSlug}/${p.slug || p.name}/${lastPrebuilds.get(p.id)?.info?.id}`} className="flex-grow flex items-center group space-x-2 truncate">
203203
{prebuildStatusIcon(lastPrebuilds.get(p.id))}
204204
<div className="font-semibold text-gray-500 dark:text-gray-400 truncate" title={lastPrebuilds.get(p.id)?.info?.branch}>{lastPrebuilds.get(p.id)?.info?.branch}</div>
205205
<span className="flex-shrink-0 mx-1 text-gray-400 dark:text-gray-600">·</span>
206206
<div className="flex-shrink-0 text-gray-400 dark:text-gray-500 group-hover:text-gray-800 dark:group-hover:text-gray-300">{moment(lastPrebuilds.get(p.id)?.info?.startedAt).fromNow()}</div>
207207
</Link>
208-
<Link to={`/${teamOrUserSlug}/${p.name}/prebuilds`} className="flex-shrink-0 flex items-center text-gray-400 hover:text-gray-600 dark:hover:text-gray-300">View All &rarr;</Link>
208+
<Link to={`/${teamOrUserSlug}/${p.slug || p.name}/prebuilds`} className="flex-shrink-0 flex items-center text-gray-400 hover:text-gray-600 dark:hover:text-gray-300">View All &rarr;</Link>
209209
</div>)
210210
: (<div className="flex h-full text-md">
211211
<p className="my-auto ">No recent prebuilds</p>

0 commit comments

Comments
 (0)