-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#2785 - Diagoriente par défaut dans la recherche #2950
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,7 +86,10 @@ export const AppellationAutocomplete = ({ | |
debounceSearchTerm: string; | ||
searchTerm: string; | ||
}) => { | ||
if (!searchTerm) return "Saisissez un métier"; | ||
if (!searchTerm) | ||
return useNaturalLanguage | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. est-ce que ce booléan est toujours utile ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oui, je me disais, au cas où, pour rollback |
||
? "Saisissez un métier ou une compétence" | ||
: "Saisissez un métier"; | ||
if (searchTerm.length < ROME_AND_APPELLATION_MIN_SEARCH_TEXT_LENGTH) | ||
return "Saisissez au moins 2 caractères"; | ||
if (isSearching || searchTerm !== debounceSearchTerm) return "..."; | ||
|
@@ -103,7 +106,8 @@ export const AppellationAutocomplete = ({ | |
inputValue: searchTerm, | ||
noOptionsMessage: () => | ||
noOptionText({ isSearching, debounceSearchTerm, searchTerm }), | ||
placeholder: "Ex : Boulanger, styliste, etc.", | ||
placeholder: | ||
props.selectProps?.placeholder ?? "Ex : Boulanger, styliste, etc.", | ||
onChange: (searchResult, actionMeta) => { | ||
if ( | ||
actionMeta.action === "clear" || | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -292,10 +292,6 @@ export const { RouteProvider, useRoute, routes } = createRouter({ | |||||
() => `/${frontRoutes.magicLinkRenewal}`, | ||||||
), | ||||||
search: defineRoute(searchParams, () => `/${frontRoutes.search}`), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pour avoir le redirect ici (pour éviter les config nginx), on peut faire :
Suggested change
(pas de préférence, je te laisse le choix) |
||||||
searchDiagoriente: defineRoute( | ||||||
searchParams, | ||||||
() => `/${frontRoutes.searchDiagoriente}`, | ||||||
), | ||||||
standard: defineRoute( | ||||||
{ pagePath: param.path.ofType(standardPagesSerializer) }, | ||||||
(params) => `/${frontRoutes.standard}/${params.pagePath}`, | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tu veux pas le faire simplement coté front ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ben j'aime autant que ce soit le serveur qui fasse la redirection direct, sans rentrer jusqu'au front.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
et puis là, le serveur va renvoyer un code 301, propre, le client ne retournera plus sur recherche-diagoriente