-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat(frontend): add a back to results link #542
Conversation
Codecov Report
@@ Coverage Diff @@
## master #542 +/- ##
==========================================
+ Coverage 72.79% 74.27% +1.48%
==========================================
Files 93 119 +26
Lines 1077 1213 +136
Branches 167 184 +17
==========================================
+ Hits 784 901 +117
- Misses 263 278 +15
- Partials 30 34 +4
Continue to review full report at Codecov.
|
|
Ah je ne savais pas que je pouvais faire ça, c'est cool ça enlève une div ! Par contre je viens de tester et j'ai l'impression que ça ne fonctionne pas avec ce component là :(
Et alors que là à priori ça devrait passer -> https://github.com/SocialGouv/next-routes/blob/master/src/index.js#L105 Mais ils proposent ça en solution et ça fonctionne ! vercel/next.js#1942 (comment) |
@revolunet changed, si ça te va, ça me va ! |
b49daaa
to
cf65b4b
Compare
@@ -14,6 +17,13 @@ const BigError = ({ children }) => ( | |||
</Container> | |||
); | |||
|
|||
// manuC: Doing this feels stange, we should talk about it |
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.
Prefer https://www.conventionalcommits.org similar format <type>(<name>): <description>
and use your Github username
TODO(UnbearableBear): Need to do this thing on my work in progress
NOTE(UnbearableBear): This code is here because ...
FIXME(UnbearableBear): Below code is bad and this is why
FUTURE(UnbearableBear): This code is temporary and will change in the future
BUG(UnbearableBear): There is a known bug here lol
HACK(UnbearableBear): This code is unnatural but do the trick because...
cf65b4b
to
1701cd8
Compare
Changed ! |
1701cd8
to
4d7c510
Compare
href="/" | ||
onClick={e => { | ||
e.preventDefault(); | ||
window.history.back(); |
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.
On decrait pouvoir reconstruire la page précedente avec la queryString
ca permettrait d'avoir un lien qui marche sans JS et qui fonctionnerait aussi en SSR.
Il faut par contre traiter le cas ou l'on a pas de queryString et dans ce cas ce serait un lien vers la home
4d7c510
to
fde6877
Compare
class Answer extends React.Component { | ||
state = { | ||
modalVisible: false | ||
modalVisible: false, | ||
isMounted: false |
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.
isMounted
What is it for ?
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.
Bordel j'ai déconné. It is useless !
|
||
return ( | ||
<Container> | ||
<Link route="index" params={{ q: search }}> |
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.
il n'y a pas que le param q
, est ce que tu peux passer directement query
à la fonction pour avoir l'ensemble de param de query ?
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.
Yes bonne idée !!
class Answer extends React.Component { | ||
state = { | ||
modalVisible: false | ||
modalVisible: false, | ||
isMounted: false |
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.
cool de rajouter l'initailState,
- il manque
searchResults
isMounted
à l'air de pas être utiliser,
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.
Yes je fais ça de suite
fde6877
to
8f7fa19
Compare
C'est minimaliste mais fonctionnel !
Closes #527