@@ -22,7 +22,6 @@ import {
2222import { Skeleton } from "@/components/ui/skeleton" ;
2323import { Tabs , TabsContent , TabsList , TabsTrigger } from "@/components/ui/tabs" ;
2424import { useDbConnection } from "@/hooks/use-db-connections" ;
25- import { trpc } from "@/lib/trpc" ;
2625
2726interface OnlineAdvisorPageProps {
2827 params : Promise < { id : string } > ;
@@ -31,7 +30,7 @@ interface OnlineAdvisorPageProps {
3130function LoadingState ( ) {
3231 return (
3332 < div className = "flex h-full flex-col" >
34- < div className = "border-b bg-gradient -to-r from-background to-muted/20 px-6 py-6" >
33+ < div className = "border-b bg-linear -to-r from-background to-muted/20 px-6 py-6" >
3534 < div className = "flex items-center gap-4" >
3635 < div className = "rounded border border-primary/20 bg-primary/10 p-3" >
3736 < SparkleIcon className = "h-6 w-6 text-primary" weight = "duotone" />
@@ -119,7 +118,7 @@ function RecommendationCard({
119118 Click apply to execute this recommendation
120119 </ div >
121120 < Button
122- className = "gap-2 bg-gradient -to-r from-primary to-primary/90 hover:from-primary/90 hover:to-primary"
121+ className = "gap-2 bg-linear -to-r from-primary to-primary/90 hover:from-primary/90 hover:to-primary"
123122 disabled = { isApplying }
124123 onClick = { onApply }
125124 size = "sm"
@@ -152,31 +151,31 @@ export default function OnlineAdvisorPage({ params }: OnlineAdvisorPageProps) {
152151 const resolvedParams = use ( params ) ;
153152 const connectionId = resolvedParams . id ;
154153
155- const utils = trpc . useUtils ( ) ;
154+ const utils = orpc . useUtils ( ) ;
156155
157156 const { data : connection } = useDbConnection ( connectionId ) ;
158157
159158 const { data : advisorStatus , isLoading : statusLoading } =
160- trpc . performance . checkOnlineAdvisorStatus . useQuery ( { id : connectionId } ) ;
159+ orpc . performance . checkOnlineAdvisorStatus . useQuery ( { id : connectionId } ) ;
161160
162161 const { data : indexRecommendations , isLoading : indexLoading } =
163- trpc . performance . getIndexRecommendations . useQuery (
162+ orpc . performance . getIndexRecommendations . useQuery (
164163 { id : connectionId } ,
165164 { enabled : advisorStatus ?. enabled }
166165 ) ;
167166
168167 const { data : statisticsRecommendations , isLoading : statsLoading } =
169- trpc . performance . getStatisticsRecommendations . useQuery (
168+ orpc . performance . getStatisticsRecommendations . useQuery (
170169 { id : connectionId } ,
171170 { enabled : advisorStatus ?. enabled }
172171 ) ;
173172
174- const { data : executorStats } = trpc . performance . getExecutorStats . useQuery (
173+ const { data : executorStats } = orpc . performance . getExecutorStats . useQuery (
175174 { id : connectionId } ,
176175 { enabled : advisorStatus ?. enabled }
177176 ) ;
178177
179- const activateMutation = trpc . performance . activateOnlineAdvisor . useMutation ( {
178+ const activateMutation = orpc . performance . activateOnlineAdvisor . useMutation ( {
180179 onSuccess : ( ) => {
181180 utils . performance . checkOnlineAdvisorStatus . invalidate ( {
182181 id : connectionId ,
@@ -197,7 +196,7 @@ export default function OnlineAdvisorPage({ params }: OnlineAdvisorPageProps) {
197196 } ,
198197 } ) ;
199198
200- const installMutation = trpc . dbConnections . installExtension . useMutation ( {
199+ const installMutation = orpc . dbConnections . installExtension . useMutation ( {
201200 onSuccess : ( ) => {
202201 utils . performance . checkOnlineAdvisorStatus . invalidate ( {
203202 id : connectionId ,
@@ -213,7 +212,7 @@ export default function OnlineAdvisorPage({ params }: OnlineAdvisorPageProps) {
213212 } ) ;
214213
215214 const applyIndexMutation =
216- trpc . performance . applyIndexRecommendation . useMutation ( {
215+ orpc . performance . applyIndexRecommendation . useMutation ( {
217216 onSuccess : ( result , variables ) => {
218217 if ( result . success ) {
219218 utils . performance . getIndexRecommendations . invalidate ( {
@@ -248,7 +247,7 @@ export default function OnlineAdvisorPage({ params }: OnlineAdvisorPageProps) {
248247 } ) ;
249248
250249 const applyStatsMutation =
251- trpc . performance . applyStatisticsRecommendation . useMutation ( {
250+ orpc . performance . applyStatisticsRecommendation . useMutation ( {
252251 onSuccess : ( result , variables ) => {
253252 if ( result . success ) {
254253 utils . performance . getStatisticsRecommendations . invalidate ( {
@@ -300,7 +299,7 @@ export default function OnlineAdvisorPage({ params }: OnlineAdvisorPageProps) {
300299
301300 return (
302301 < div className = "flex h-full flex-col" >
303- < div className = "border-b bg-gradient -to-r from-background to-muted/20 px-6 py-6" >
302+ < div className = "border-b bg-linear -to-r from-background to-muted/20 px-6 py-6" >
304303 < div className = "flex items-center gap-4" >
305304 < div className = "rounded-xl border border-primary/20 bg-primary/10 p-3" >
306305 < SparkleIcon className = "h-6 w-6 text-primary" weight = "duotone" />
0 commit comments