Index: pages/+Layout.telefunc.ts
===================================================================
--- pages/+Layout.telefunc.ts	(revision 5ce5904505744192d6f836fac3fea6ddf058d6ea)
+++ pages/+Layout.telefunc.ts	(revision 226fbbbab48f243ba6045007157b751910cdc7fb)
@@ -2,6 +2,7 @@
 import {ctx, getAuthState, requireUser} from "../server/telefunc/ctx";
 import {Abort} from "telefunc";
+import type {Database} from "../database/drizzle/db";
 
-export async function getAuthenticationState() {
+export async function AuthenticationState() {
     const context = getAuthState();
 
@@ -9,5 +10,5 @@
 }
 
-export async function getPopupAllComponents({ componentType, limit, q }
+export async function onGetAllComponents({ componentType, limit, q }
                                             : { componentType?: string; limit?: number; q?: string }) {
     const c = ctx();
@@ -18,5 +19,5 @@
 }
 
-export async function getPopupComponentDetails({ componentId }
+export async function onGetComponentDetails({ componentId }
                                            : { componentId: number }) {
     const context = ctx();
@@ -31,9 +32,9 @@
 }
 
-export async function getPopupSuggestComponent({ link, description, componentType }
+export async function onSuggestComponent({ link, description, componentType }
                                                : { link: string; description: string; componentType: string }) {
     const { c, userId } = requireUser()
 
-    const newSuggestionId = await drizzleQueries.addComponentSuggestion(c.db, userId, link, description, componentType);
+    const newSuggestionId = await drizzleQueries.addNewComponentSuggestion(c.db, userId, link, description, componentType);
 
     if(!newSuggestionId) throw Abort();
@@ -42,5 +43,5 @@
 }
 
-export async function getPopupAllApprovedBuilds({ limit, q }
+export async function onGetApprovedBuilds({ limit, q }
                                                  : { limit?: number; q?: string }) {
     const context = ctx();
@@ -51,5 +52,5 @@
 }
 
-export async function getPopupHighestRankedBuilds({ limit }
+export async function onGetHighestRankedBuilds({ limit }
                                                   : { limit?: number }) {
     const context = ctx();
@@ -62,5 +63,5 @@
 // Shared
 
-export async function getPopupBuildDetails({ buildId }
+export async function onGetBuildDetails({ buildId }
                                            : { buildId: number }) {
     const context = getAuthState();
@@ -75,5 +76,5 @@
 }
 
-export async function togglePopupFavorite({ buildId }
+export async function onToggleFavorite({ buildId }
                                           : { buildId: number }) {
     const { c, userId } = requireUser()
@@ -86,5 +87,5 @@
 }
 
-export async function setPopupRating({ buildId, value }
+export async function onSetRating({ buildId, value }
                                      : { buildId: number; value: number }) {
     const { c, userId } = requireUser()
@@ -99,5 +100,5 @@
 }
 
-export async function setPopupReview({ buildId, content }
+export async function onSetReview({ buildId, content }
                                      : { buildId: number; content: string }) {
     const { c, userId } = requireUser()
@@ -110,5 +111,5 @@
 }
 
-export async function clonePopupBuild({ buildId }
+export async function onCloneBuild({ buildId }
                                       : { buildId: number }) {
     const { c, userId } = requireUser()
@@ -116,8 +117,14 @@
     if (!Number.isInteger(buildId) || buildId <= 0) throw Abort();
 
-    const newBuildId = await drizzleQueries.cloneBuild(c.db, userId, buildId);
+    const newBuild = await drizzleQueries.cloneBuild(c.db, userId, buildId);
 
-    if (!newBuildId) throw Abort();
+    if (!newBuild) throw Abort();
 
-    return newBuildId;
+    return newBuild;
 }
+
+
+
+
+
+
