Sha256: 2d773b6f71351993221f1cda2e2be248acc59ffdc889b29e4157adb59f7b1416
Contents?: true
Size: 728 Bytes
Versions: 3
Compression:
Stored size: 728 Bytes
Contents
package <%= package_name %>.features.web import <%= package_name %>.base.NavDestination import <%= package_name %>.util.SIGN_IN_URL import dev.hotwire.turbo.fragments.TurboWebFragment import dev.hotwire.turbo.nav.TurboNavGraphDestination import dev.hotwire.turbo.visit.TurboVisitAction.REPLACE import dev.hotwire.turbo.visit.TurboVisitOptions @TurboNavGraphDestination(uri = "turbo://fragment/web") open class WebFragment : TurboWebFragment(), NavDestination { override fun onVisitErrorReceived(location: String, errorCode: Int) { when (errorCode) { 401 -> navigate(SIGN_IN_URL, TurboVisitOptions(action = REPLACE)) else -> super.onVisitErrorReceived(location, errorCode) } } }
Version data entries
3 entries across 3 versions & 1 rubygems