Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nadavsteindler committed Dec 18, 2024
1 parent aab6e34 commit 1d7a9da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/api/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1893,7 +1893,7 @@ func (c *Controller) ListRepositories(w http.ResponseWriter, r *http.Request, pa
ctx := r.Context()
c.LogAction(ctx, "list_repos", r, "", "", "")

repos, hasMore, err := c.Catalog.ListRepositories(ctx, paginationAmount(params.Amount), paginationPrefix(params.Prefix), paginationSearch(params.Search), paginationAfter(params.After))
repos, hasMore, err := c.Catalog.ListRepositories(ctx, paginationAmount(params.Amount), paginationPrefix(params.Prefix), search(params.Search), paginationAfter(params.After))
if c.handleAPIError(ctx, w, r, err) {
return
}
Expand Down Expand Up @@ -5470,7 +5470,7 @@ func paginationDelimiter(v *apigen.PaginationDelimiter) string {
return string(*v)
}

func paginationSearch(v *apigen.SearchString) string {
func search(v *apigen.SearchString) string {
if v == nil {
return ""
}
Expand Down
4 changes: 2 additions & 2 deletions webui/src/pages/repositories/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const RepositoriesPage = () => {
const [showActionsBar, setShowActionsBar] = useState(false);

const routerPfx = (router.query.search) ? router.query.search : "";
const [search, setsearch] = useDebouncedState(
const [search, setSearch] = useDebouncedState(
routerPfx,
(search) => router.push({pathname: `/repositories`, query: {search}})
);
Expand Down Expand Up @@ -255,7 +255,7 @@ const RepositoriesPage = () => {
placeholder="Find a repository..."
autoFocus
value={search}
onChange={event => setsearch(event.target.value)}
onChange={event => setSearch(event.target.value)}
/>
</InputGroup>
</Col>
Expand Down

0 comments on commit 1d7a9da

Please sign in to comment.