style(snapshots): fix margin in timeline

This commit is contained in:
Nicolas Meienberger
2025-11-05 21:31:49 +01:00
parent 99d4d46338
commit 941be2f306
2 changed files with 3 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ export const SnapshotTimeline = (props: Props) => {
<div className="w-full bg-card"> <div className="w-full bg-card">
<div className="relative flex items-center"> <div className="relative flex items-center">
<div className="flex-1 overflow-hidden"> <div className="flex-1 overflow-hidden">
<div className="flex gap-4 overflow-x-auto pb-2"> <div className="flex gap-4 overflow-x-auto pb-2 [&>:first-child]:ml-2 [&>:last-child]:mr-2">
{snapshots.map((snapshot, index) => { {snapshots.map((snapshot, index) => {
const date = new Date(snapshot.time); const date = new Date(snapshot.time);
const isSelected = snapshotId === snapshot.short_id; const isSelected = snapshotId === snapshot.short_id;

View File

@@ -30,7 +30,7 @@ export const formatSnapshotDuration = (seconds: number) => {
export const RepositorySnapshotsTabContent = ({ repository }: Props) => { export const RepositorySnapshotsTabContent = ({ repository }: Props) => {
const [searchQuery, setSearchQuery] = useState(""); const [searchQuery, setSearchQuery] = useState("");
const { data, isLoading, failureReason } = useQuery({ const { data, isFetching, failureReason } = useQuery({
...listSnapshotsOptions({ path: { name: repository.name } }), ...listSnapshotsOptions({ path: { name: repository.name } }),
refetchInterval: 10000, refetchInterval: 10000,
refetchOnWindowFocus: true, refetchOnWindowFocus: true,
@@ -67,7 +67,7 @@ export const RepositorySnapshotsTabContent = ({ repository }: Props) => {
); );
} }
if (isLoading && !data.length && !failureReason) { if (isFetching && !data.length) {
return ( return (
<Card> <Card>
<CardContent className="flex items-center justify-center py-12"> <CardContent className="flex items-center justify-center py-12">
@@ -90,7 +90,6 @@ export const RepositorySnapshotsTabContent = ({ repository }: Props) => {
} }
if (!data.length) { if (!data.length) {
console.log("No snapshots found for repository:", repository.name);
return ( return (
<Card> <Card>
<CardContent className="flex flex-col items-center justify-center text-center py-16 px-4"> <CardContent className="flex flex-col items-center justify-center text-center py-16 px-4">