mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
style(snapshots): fix margin in timeline
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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">
|
||||||
|
|||||||
Reference in New Issue
Block a user