[Frontend] Created a 404 Page
Description
Create a 404 Page. If the user goes to a route that is not registered in the app, this page will show up instead.
Fixes #111
Type of change
- [x] New feature (non-breaking change which adds functionality)
How Has This Been Tested?
Try going to a route that is not present. For example :
http://localhost:3000/test
Test Configuration:
- Google Chrome
- Windows 10

Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
Hey there!
Thanks a bunch for spotting this one and for putting together a clear test case! You're totally right; that's a bug we definitely need to squash.
I'll work on a fix and cut a release soon. Keep your eyes peeled for any updates. 😄
After looking into it a bit, this is actually intended functionality.
There is a second (albeit undocumented) parameter that solves this issue called unique, which is set to true by default.
public function testDetectRepeatedEmoji() {
$string = '💩💩';
$emojis = (new EmojiDetector())->detect($string, false);
$this->assertCount(2, $emojis);
}
When setting this second parameter to false, the test now passes.
Initially this parameter did not exist, and was added in 2022 when the isSingleEmoji() method was introduced.
Prior to that, the default behaviour was the same as now, to only show a unique list of emojis that were detected in a string.
I personally think the behaviour should flip, but this means a breaking change for anyone using the library. Curious to hear your opinion too.
If you're in a pickle, you can use that second parameter for now, and I'll update the documentation to describe it.
Oh that works then, that's fine, just adding docs for it would be helpful. I actually only found this library because I was working on updates to my own emoji library and wanted to look for an example of finding emoji that didn't use a regex.