-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from openfoodfacts/autoreload-login
Autoreload login
- Loading branch information
Showing
6 changed files
with
93 additions
and
23 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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import Box from '@mui/material/Box'; | ||
import Alert from '@mui/material/Alert'; | ||
import IconButton from '@mui/material/IconButton'; | ||
import Collapse from '@mui/material/Collapse'; | ||
import CloseIcon from '@mui/icons-material/Close'; | ||
|
||
interface AuthAlertProps { | ||
message: string; | ||
severity: 'error' | 'warning' | 'info' | 'success'; | ||
isOpen: boolean; | ||
setIsOpen: (isOpen: boolean) => void; | ||
} | ||
|
||
export default function AuthAlert({ message, severity, isOpen, setIsOpen }: AuthAlertProps) { | ||
return ( | ||
<Box sx={{ width: '100%' }} > | ||
<Collapse in={isOpen}> | ||
<Alert | ||
action={ | ||
<IconButton | ||
aria-label="close" | ||
color="inherit" | ||
size="small" | ||
onClick={() => { | ||
setIsOpen(false); | ||
}} | ||
> | ||
<CloseIcon fontSize="inherit" /> | ||
</IconButton> | ||
} | ||
severity={severity} | ||
sx={{ mb: 2 }} | ||
> | ||
{ message } | ||
</Alert> | ||
</Collapse> | ||
</Box> | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* List of all moderators usernames | ||
* These moderators have the ability to moderate flags | ||
*/ | ||
export const MODERATORS = [ | ||
"valimp", | ||
"raphael0202", | ||
"alex-off", | ||
"charlesnepote", | ||
"gala-nafikova", | ||
"manoncorneille", | ||
"stephane", | ||
"teolemon", | ||
"segundo", | ||
"tacite", | ||
"october-food-facts", | ||
"odinh", | ||
"jusdekiwi", | ||
] |