Skip to content

Commit 20c0564

Browse files
authored
fix(enterprise): smooth audit log list animation (#3905)
1 parent f9d73db commit 20c0564

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

apps/sim/app/(home)/components/enterprise/components/audit-log-preview.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,14 @@ export function AuditLogPreview() {
166166
const counterRef = useRef(ENTRY_TEMPLATES.length)
167167
const templateIndexRef = useRef(6 % ENTRY_TEMPLATES.length)
168168

169-
const now = Date.now()
170-
const [entries, setEntries] = useState<LogEntry[]>(() =>
171-
ENTRY_TEMPLATES.slice(0, 6).map((t, i) => ({
169+
const [entries, setEntries] = useState<LogEntry[]>(() => {
170+
const now = Date.now()
171+
return ENTRY_TEMPLATES.slice(0, 6).map((t, i) => ({
172172
...t,
173173
id: i,
174174
insertedAt: now - INITIAL_OFFSETS_MS[i],
175175
}))
176-
)
176+
})
177177
const [, tick] = useState(0)
178178

179179
useEffect(() => {
@@ -208,10 +208,9 @@ export function AuditLogPreview() {
208208
exit={{ opacity: 0 }}
209209
transition={{
210210
layout: {
211-
type: 'spring',
212-
stiffness: 350,
213-
damping: 50,
214-
mass: 0.8,
211+
type: 'tween',
212+
duration: 0.32,
213+
ease: [0.25, 0.46, 0.45, 0.94],
215214
},
216215
y: { duration: 0.32, ease: [0.25, 0.46, 0.45, 0.94] },
217216
opacity: { duration: 0.25 },

0 commit comments

Comments
 (0)