defmodule LivebookWeb.Hub.NewLive do
use LivebookWeb, :live_view
alias LivebookWeb.{PageHelpers, LayoutHelpers}
alias Phoenix.LiveView.JS
on_mount LivebookWeb.SidebarHook
@impl true
def mount(_params, _session, socket) do
{:ok, assign(socket, selected_type: nil, page_title: "Livebook - Hub")}
end
@impl true
def render(assigns) do
~H"""
Manage your Livebooks in the cloud with Hubs.
1. Select your Hub service
2. Configure your Hub
<%= if @selected_type == "fly" do %>
<.live_component module={LivebookWeb.Hub.New.FlyComponent} id="fly-form" />
<% end %>
<%= if @selected_type == "enterprise" do %>
<%= @title %>
<%= render_slot(@headline) %>