mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-02-22 04:30:33 +09:00
10 lines
263 B
JavaScript
10 lines
263 B
JavaScript
import { Controller } from "@hotwired/stimulus"
|
|
import { nextFrame } from "helpers/timing_helpers"
|
|
|
|
export default class extends Controller {
|
|
async connect() {
|
|
await nextFrame()
|
|
this.element.scrollIntoView({ behavior: "smooth", block: "center" })
|
|
}
|
|
}
|