mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2025-12-24 02:39:18 -05:00
Compare commits
1 Commits
85cf420438
...
fix/user-w
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb25ad8457 |
@@ -17,14 +17,13 @@ interface UserWarningsProps {
|
||||
const UserWarnings: React.FC<UserWarningsProps> = ({ onClick }) => {
|
||||
const intl = useIntl();
|
||||
const { user } = useUser();
|
||||
if (!user) {
|
||||
//check if a user has warnings
|
||||
if (!user || !user.warnings || user.warnings.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let res = null;
|
||||
|
||||
//check if a user has warnings
|
||||
if (user.warnings.length > 0) {
|
||||
user.warnings.forEach((warning) => {
|
||||
let link = '';
|
||||
let warningText = '';
|
||||
@@ -57,7 +56,6 @@ const UserWarnings: React.FC<UserWarningsProps> = ({ onClick }) => {
|
||||
</Link>
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
return res;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user