From 30be48155ffb475659237c01e0536c16c667d723 Mon Sep 17 00:00:00 2001 From: zafer Date: Sat, 4 May 2024 14:10:15 +0300 Subject: [PATCH] redirect /cossgpt to example query result --- lib/algora_web/live/cossgpt_live.ex | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/algora_web/live/cossgpt_live.ex b/lib/algora_web/live/cossgpt_live.ex index a81d1d3..dca8c44 100644 --- a/lib/algora_web/live/cossgpt_live.ex +++ b/lib/algora_web/live/cossgpt_live.ex @@ -86,14 +86,13 @@ defmodule AlgoraWeb.COSSGPTLive do :for={ suggestion_group <- [ [ - "Benefits of going open source", "Business models and pricing", "Choosing a license", - "How to hire engineers" + "How to hire engineers", + "B2B startup metrics" ], [ "How to get your first customers", - "B2B startup metrics", "Setting KPIs and goals", "How to fundraise", "Developer marketing" @@ -201,7 +200,14 @@ defmodule AlgoraWeb.COSSGPTLive do end @impl true - def mount(_params, _session, socket) do + def mount(params, _session, socket) do + socket = + if !params["query"] do + socket |> push_navigate(to: ~p"/cossgpt?#{%{query: "Benefits of going open source"}}") + else + socket + end + {:ok, socket} end