File tree Expand file tree Collapse file tree 4 files changed +7
-8
lines changed Expand file tree Collapse file tree 4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,6 @@ import { SearchController } from "../controllers/search.controller";
44const searchRoutes = Router ( ) ;
55
66searchRoutes . get ( "/users" , SearchController . searchUsers ) ;
7- searchRoutes . get ( "/content " , SearchController . searchContents ) ;
7+ searchRoutes . get ( "/contents " , SearchController . searchContents ) ;
88
99export default searchRoutes ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import dotenv from 'dotenv';
33
44dotenv . config ( ) ;
55const stripe = new Stripe ( process . env . STRIPE_SECRET_KEY || '' , {
6- apiVersion : '2025-03-31 .basil' ,
6+ apiVersion : '2025-04-30 .basil' ,
77} ) ;
88
99/**
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import Cookies from "js-cookie";
1212import NotificationList from "./notification/NotificationList" ;
1313import { SubscriptionService } from "../services/SubscriptionService" ;
1414import { SearchService } from "../services/SearchService" ;
15- import SearchList from "./search/SearchListContent " ;
15+ import SearchList from "./search/SearchListResults " ;
1616
1717export default function Navbar ( ) {
1818 // ---------------------------------------
@@ -110,13 +110,12 @@ export default function Navbar() {
110110 e . preventDefault ( ) ;
111111
112112 // Validation
113- if ( ! query ) {
113+ const trimmedQuery = query . trim ( ) ;
114+ if ( trimmedQuery === "" ) {
114115 setShowSearchResults ( false ) ;
115116 return ;
116117 }
117118
118- const trimmedQuery = query . trim ( ) ;
119-
120119 // Search Queries
121120 const userSearchResults = await SearchService . searchUsers ( trimmedQuery ) ;
122121 const contentSearchResults = await SearchService . searchContents (
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import ContentSearchResult from "./ContentSearchResult";
66import UserSearchResults from "./UserSearchResult" ;
77import { SearchService } from "../../services/SearchService" ;
88
9- function SearchListContent ( {
9+ function SearchListResults ( {
1010 userSearchResults,
1111 contentSearchResults,
1212} : {
@@ -212,7 +212,7 @@ const SearchList = (props: {
212212} ) => {
213213 return (
214214 < Suspense fallback = { < div > Loading search results...</ div > } >
215- < SearchListContent { ...props } />
215+ < SearchListResults { ...props } />
216216 </ Suspense >
217217 ) ;
218218} ;
You can’t perform that action at this time.
0 commit comments