-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
asmyshlyaev177
committed
Nov 21, 2024
1 parent
2a3f4f7
commit 9ad5dd9
Showing
5 changed files
with
28 additions
and
20 deletions.
There are no files selected for viewing
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,4 +1,7 @@ | ||
{ | ||
"extends": ["next/core-web-vitals"], | ||
"root": true | ||
"root": true, | ||
"rules": { | ||
"react/display-name": "off" | ||
} | ||
} |
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,19 +1,22 @@ | ||
import { clsx } from "clsx"; | ||
import React from "react"; | ||
|
||
import { Button } from "./Button"; | ||
export const RefreshButton = ({ className }: { className?: string }) => { | ||
return ( | ||
<Button | ||
onClick={() => { | ||
window.location.reload(); | ||
}} | ||
className={clsx( | ||
`transition font-extrabold bg-orange-700 text-lg text-white`, | ||
className, | ||
)} | ||
name="Reload page" | ||
> | ||
Reload page | ||
</Button> | ||
); | ||
}; | ||
export const RefreshButton = React.memo( | ||
({ className }: { className?: string }) => { | ||
return ( | ||
<Button | ||
onClick={() => { | ||
window.location.reload(); | ||
}} | ||
className={clsx( | ||
`transition font-extrabold bg-orange-700 text-lg text-white`, | ||
className, | ||
)} | ||
name="Reload page" | ||
> | ||
Reload page | ||
</Button> | ||
); | ||
}, | ||
); |