feat: Add barrel roll easter egg

This commit is contained in:
Jesse Wierzbinski 2024-07-22 21:50:20 +02:00
parent 9b75c25fa0
commit 76d28e04a3
No known key found for this signature in database
2 changed files with 24 additions and 0 deletions

View file

@ -301,6 +301,21 @@ const SearchInput = forwardRef<
autocompleteState.status === "stalled" ? "pr-11" : "pr-4",
)}
{...inputProps}
onInput={(event) => {
if (
event.currentTarget.value
.toLowerCase()
.includes("barrel roll")
) {
event.currentTarget.value = "";
document.body.classList.add("animate-roll");
setTimeout(
() =>
document.body.classList.remove("animate-roll"),
2000,
);
}
}}
onKeyDown={(event) => {
if (
event.key === "Escape" &&