csr tangled client in solid-js
15

Configure Feed

Select the types of activity you want to include in your feed.

make a few places in commit headline navigate to the commit when clicked

dawn (May 30, 2026, 6:30 AM +0300) 33a269f6 40a1b57e

+10 -9
+10 -9
src/pages/repo/code.tsx
··· 2 2 import { File, Folder, GitBranch, GitCommitHorizontal, List } from 'lucide-solid'; 3 3 import { A, useNavigate, useParams } from '@solidjs/router'; 4 4 import { createQuery, keepPreviousData, useQueryClient } from '@tanstack/solid-query'; 5 - import { For, Match, Show, Switch, createEffect, createMemo, createSignal, type Component } from 'solid-js'; 6 - import { buildBlobDataUrl, decodeBlobText, getRepoBlob, getRepoBranches, getRepoDefaultBranch, getRepoLanguages, getRepoLog, getRepoTags, getRepoTree } from '../../lib/api/repos'; 5 + import { For, Match, Show, Switch, createEffect, createMemo, createSignal, type Accessor, type Component } from 'solid-js'; 6 + import { buildBlobDataUrl, decodeBlobText, getRepoBlob, getRepoBranches, getRepoDefaultBranch, getRepoLanguages, getRepoLog, getRepoTags, getRepoTree, type CommitHeadline } from '../../lib/api/repos'; 7 7 import { Avatar, ErrorState, PlaceholderAvatar, buttonStyles, cardStyles } from '../../components/common'; 8 8 import { CloneDropdown, CodeView, FileRow, MarkdownBlock, OverviewFileRow, ReadmeCard, RepoBlobSkeleton, RepoLanguageBarSkeleton, RepoTreeSkeleton } from '../../components/repo'; 9 9 import { RepoFrame, useRepoQuery } from './shared'; ··· 893 893 const isSvg = createMemo(() => svgLike(path(), blob.mimeType)); 894 894 const isVideo = createMemo(() => videoLike(path(), blob.mimeType)); 895 895 const isImage = createMemo(() => imageLike(path(), blob.mimeType)); 896 - const showingText = createMemo( 897 - () => blob.content !== undefined && !blob.fileTooLarge && (!blob.isBinary || isSvg()), 898 - ); 899 - const lineCount = createMemo(() => countLines(text())); 896 + const showingText = createMemo( 897 + () => blob.content !== undefined && !blob.fileTooLarge && (!blob.isBinary || isSvg()), 898 + ); 899 + const lineCount = createMemo(() => countLines(text())); 900 + const commitLink = (commit: Accessor<CommitHeadline>) => `/${repo.owner.handle}/${repo.slug}/commit/${commit().hash}`; 900 901 901 902 return ( 902 903 <div class="untangled-blob-card peer"> ··· 957 958 {commit().author?.name || 'unknown author'} 958 959 </span> 959 960 <span class="select-none text-gray-400 dark:text-gray-500">·</span> 960 - <span class="truncate text-gray-900 dark:text-gray-100">{commit().message.trim().split('\n')[0]}</span> 961 + <A href={commitLink(commit)} class="truncate text-gray-900 dark:text-gray-100">{commit().message.trim().split('\n')[0]}</A> 961 962 <span class="select-none text-gray-400 dark:text-gray-500">·</span> 962 - <span class="text-gray-400 dark:text-gray-500">{formatRelativeTime(commit().when)}</span> 963 + <A href={commitLink(commit)} class="text-gray-400 dark:text-gray-500">{formatRelativeTime(commit().when)}</A> 963 964 </div> 964 965 <A 965 - href={`/${repo.owner.handle}/${repo.slug}/commit/${commit().hash}`} 966 + href={commitLink(commit)} 966 967 class="untangled-blob-commit-link" 967 968 > 968 969 {commit().hash.slice(0, 8)}