Skip to content

Commit

Permalink
feat: use Github API to sync theme info instead of extension repo as …
Browse files Browse the repository at this point in the history
…its faster
  • Loading branch information
labithiotis committed Oct 25, 2024
1 parent a50b050 commit 05cbd15
Show file tree
Hide file tree
Showing 6 changed files with 6,814 additions and 1,071 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
repository: zed-industries/extensions
path: .tmp/zed-extensions
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions app/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function Navbar() {
const setLanguage = useLanguage((s) => s.setLanguage);
const { userId } = useRouteLoaderData<RootData>('root') ?? {};
const searchParams = new URLSearchParams(location.search);
const [searchTerm, setSearchTerm] = useState(searchParams.get('search') ?? '');
const [searchTerm, setSearchTerm] = useState(decodeURI(searchParams.get('search') ?? ''));

const isRoot = location.pathname === '/';

Expand All @@ -49,7 +49,7 @@ export function Navbar() {
const updateSearchQuery = useCallback(
debounce((search?: string) => {
if (search) {
searchParams.set('search', search);
searchParams.set('search', encodeURI(search));
navigate({ search: searchParams.toString() });
} else {
searchParams.delete('search');
Expand Down
2 changes: 1 addition & 1 deletion app/routes/_index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const loader: LoaderFunction = async (args) => {
const db = drizzle(args.context.env.db, { schema });
const url = new URL(args.request.url);
const search = url.searchParams.get('search');
const searchQuery = search ? `%${search}%` : undefined;
const searchQuery = search ? `%${decodeURI(search)}%` : undefined;

const records = await db
.select()
Expand Down
Loading

0 comments on commit 05cbd15

Please sign in to comment.