Skip to content

Commit

Permalink
minor fixes (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar authored Oct 22, 2024
1 parent 51513ef commit 7f2322d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/components/CodeEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ ${code}
cursor: "pointer",
},
}),
EditorView.decorations.of((view) => {
if (!metaKeyDown) return Decoration.set([])
EditorView.decorations.of((view: any) => {
const decorations = []
for (let { from, to } of view.visibleRanges) {
for (let pos = from; pos < to; ) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const DashboardPage = () => {
)}
{mySnippets && mySnippets.length > 10 && (
<Link
href="/my-snippets"
href={`/${currentUser}`}
className="text-sm text-blue-600 hover:underline mt-2 inline-block"
>
View all snippets
Expand Down
6 changes: 4 additions & 2 deletions src/pages/user-profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ export const UserProfilePage = () => {
},
)

const filteredSnippets = userSnippets?.filter((snippet) =>
snippet.unscoped_name.toLowerCase().includes(searchQuery.toLowerCase()),
const filteredSnippets = userSnippets?.filter(
(snippet) =>
!searchQuery ||
snippet.unscoped_name.toLowerCase().includes(searchQuery.toLowerCase()),
)

return (
Expand Down

0 comments on commit 7f2322d

Please sign in to comment.