Skip to content

Commit

Permalink
Update styling
Browse files Browse the repository at this point in the history
  • Loading branch information
shelwinsunga committed Aug 6, 2024
1 parent e7592f8 commit 0980465
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions ell-studio/src/pages/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import VersionBadge from '../components/VersionBadge';
import { Code } from 'lucide-react';
import { Card, CardHeader, CardContent } from 'components/common/Card';
import { ScrollArea } from 'components/common/ScrollArea';
import { Badge } from 'components/common/Badge';
import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from 'components/common/Resizable';

function Home() {
const [expandedLMP, setExpandedLMP] = useState(null);
const { darkMode } = useTheme();
const { data: lmps, isLoading: isLoadingLMPs } = useLatestLMPs();
const { data: traces, isLoading: isLoadingTraces } = useTraces(lmps);


const toggleExpand = (lmpName, event) => {
if (event.target.tagName.toLowerCase() !== 'a') {
Expand Down Expand Up @@ -45,10 +45,10 @@ function Home() {
</span>
<div className="flex items-center">
<span className={`mr-4 text-sm ${darkMode ? 'text-gray-300' : 'text-gray-600'}`}>
{/* Total LMPs: {lmps.length} */}
Total LMPs: {lmps.length}
</span>
<span className={`text-sm ${darkMode ? 'text-gray-300' : 'text-gray-600'}`}>
{/* Last Updated: {lmps[0] && lmps[0].versions && lmps[0].versions[0] ? getTimeAgo(lmps[0].versions[0].created_at) : 'N/A'} */}
Last Updated: {lmps[0] && lmps[0].versions && lmps[0].versions[0] ? getTimeAgo(lmps[0].versions[0].created_at) : 'N/A'}
</span>
</div>
</div>
Expand All @@ -68,23 +68,23 @@ function Home() {
onClick={(e) => toggleExpand(lmp.name, e)}
>
<CardHeader>
<div className="flex justify-between">
<div className="flex flex-col space-y-2">
<Link
to={`/lmp/${lmp.name}`}
className={`text-xl font-semibold ${darkMode ? 'text-gray-100 hover:text-blue-300' : 'text-gray-800 hover:text-blue-600'} break-words`}
onClick={(e) => e.stopPropagation()}
>
{truncateId(lmp.name)}
{lmp.name}
</Link>
<div className="flex space-x-2">
<span className={`text-xs px-2 py-1 rounded-full ${darkMode ? 'bg-gray-700 text-gray-300' : 'bg-gray-200 text-gray-700'}`}>
ID: {truncateId(lmp.lmp_id)}
</span>
<span className={`text-xs px-2 py-1 rounded-full ml-2 ${darkMode ? 'bg-green-600 text-white' : 'bg-green-100 text-green-800'}`}>
Latest
</span>
<VersionBadge version={lmp.version_number + 1} hash={lmp.lmp_id} />
</div>
<span className={`text-xs px-2 py-1 rounded-full ${darkMode ? 'bg-gray-700 text-gray-300' : 'bg-gray-200 text-gray-700'}`}>
ID: {truncateId(lmp.lmp_id)}
</span>
<span className={`text-xs px-2 py-1 rounded-full ${darkMode ? 'bg-green-600 text-white' : 'bg-green-100 text-green-800'}`}>
Latest
</span>
<VersionBadge version={lmp.version_number + 1} hash={lmp.lmp_id} />
</div>
</div>
</CardHeader>
<CardContent>
Expand Down

0 comments on commit 0980465

Please sign in to comment.