[ESLint rule]: recoil value and setter should be named after their at… (#1402)
* Override unwanted changes Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Toledodev <rafael.toledo@engenharia.ufjf.br> Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com> * Fix the tests Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Toledodev <rafael.toledo@engenharia.ufjf.br> Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com> --------- Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Toledodev <rafael.toledo@engenharia.ufjf.br> Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com> Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
This commit is contained in:
@ -53,13 +53,13 @@ const reducedVariants = {
|
||||
export function SnackBarProvider({ children }: React.PropsWithChildren) {
|
||||
const reducedMotion = useReducedMotion();
|
||||
|
||||
const [snackBarState, setSnackBarState] = useRecoilState(
|
||||
const [snackBarInternal, setSnackBarInternal] = useRecoilState(
|
||||
snackBarInternalState,
|
||||
);
|
||||
|
||||
// Handle snackbar close event
|
||||
const handleSnackBarClose = (id: string) => {
|
||||
setSnackBarState((prevState) => ({
|
||||
setSnackBarInternal((prevState) => ({
|
||||
...prevState,
|
||||
queue: prevState.queue.filter((snackBar) => snackBar.id !== id),
|
||||
}));
|
||||
@ -69,7 +69,7 @@ export function SnackBarProvider({ children }: React.PropsWithChildren) {
|
||||
<>
|
||||
{children}
|
||||
<StyledSnackBarContainer>
|
||||
{snackBarState.queue.map((snackBar) => (
|
||||
{snackBarInternal.queue.map((snackBar) => (
|
||||
<StyledSnackBarMotionContainer
|
||||
key={snackBar.id}
|
||||
variants={reducedMotion ? reducedVariants : variants}
|
||||
|
||||
Reference in New Issue
Block a user