-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Move deps/devDeps/peerDeps to appropriate location (#5498)
- Loading branch information
1 parent
626652a
commit c05b8b8
Showing
133 changed files
with
1,299 additions
and
1,428 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
import algoliasearch from "algoliasearch"; | ||
import { Hit } from "@algolia/client-search"; | ||
import algoliasearch from 'algoliasearch' | ||
import { Hit } from '@algolia/client-search' | ||
|
||
// From Algolia example | ||
// https://github.com/algolia/react-instantsearch | ||
const ALGOLIA_APP_ID = "latency"; | ||
const ALGOLIA_SEARCH_API_KEY = "6be0576ff61c053d5f9a3225e2a90f76"; | ||
const ALGOLIA_APP_ID = 'latency' | ||
const ALGOLIA_SEARCH_API_KEY = '6be0576ff61c053d5f9a3225e2a90f76' | ||
|
||
type SearchOptions = { | ||
indexName: string; | ||
query: string; | ||
pageParam: number; | ||
hitsPerPage: number; | ||
}; | ||
indexName: string | ||
query: string | ||
pageParam: number | ||
hitsPerPage: number | ||
} | ||
|
||
export async function search<TData>({ | ||
indexName, | ||
query, | ||
pageParam, | ||
hitsPerPage = 10, | ||
}: SearchOptions): Promise<{ | ||
hits: Hit<TData>[]; | ||
nextPage: number | undefined; | ||
hits: Hit<TData>[] | ||
nextPage: number | undefined | ||
}> { | ||
const client = algoliasearch(ALGOLIA_APP_ID, ALGOLIA_SEARCH_API_KEY); | ||
const index = client.initIndex(indexName); | ||
const client = algoliasearch(ALGOLIA_APP_ID, ALGOLIA_SEARCH_API_KEY) | ||
const index = client.initIndex(indexName) | ||
|
||
console.log("alogolia:search", { indexName, query, pageParam, hitsPerPage }); | ||
console.log('alogolia:search', { indexName, query, pageParam, hitsPerPage }) | ||
|
||
const { hits, page, nbPages } = await index.search<TData>(query, { | ||
page: pageParam, | ||
hitsPerPage, | ||
}); | ||
}) | ||
|
||
const nextPage = page + 1 < nbPages ? page + 1 : undefined; | ||
const nextPage = page + 1 < nbPages ? page + 1 : undefined | ||
|
||
return { hits, nextPage }; | ||
return { hits, nextPage } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import ReactDOM from "react-dom/client"; | ||
import ReactDOM from 'react-dom/client' | ||
|
||
import App from "./App"; | ||
import App from './App' | ||
|
||
const rootElement = document.getElementById("root") as HTMLElement; | ||
ReactDOM.createRoot(rootElement).render(<App />); | ||
const rootElement = document.getElementById('root') as HTMLElement | ||
ReactDOM.createRoot(rootElement).render(<App />) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { defineConfig } from "vite"; | ||
import react from "@vitejs/plugin-react"; | ||
import { defineConfig } from 'vite' | ||
import react from '@vitejs/plugin-react' | ||
|
||
export default defineConfig({ | ||
plugins: [react()], | ||
}); | ||
}) |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.