Lint all the things
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { EyeFilled, EyeOutlined, UserOutlined } from "@ant-design/icons";
|
||||
import { Avatar, Button, Divider, List, Popover, Select, Tooltip, Typography } from "antd";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -31,7 +30,7 @@ export default function JobWatcherToggleComponent({
|
||||
|
||||
const handleRenderItem = (watcher) => {
|
||||
// Check if watcher is defined and has user_email
|
||||
if (!watcher || !watcher.user_email) {
|
||||
if (!watcher?.user_email) {
|
||||
return null; // Skip rendering invalid watchers
|
||||
}
|
||||
|
||||
@@ -44,6 +43,7 @@ export default function JobWatcherToggleComponent({
|
||||
<Button
|
||||
type="default"
|
||||
danger
|
||||
key="remove"
|
||||
size="medium"
|
||||
icon={<BiSolidTrash />}
|
||||
onClick={() => handleRemoveWatcher(watcher.user_email)}
|
||||
@@ -67,7 +67,11 @@ export default function JobWatcherToggleComponent({
|
||||
<List>
|
||||
<List.Item
|
||||
actions={[
|
||||
<Tooltip title={!isEmployee ? t("notifications.tooltips.not-employee") : ""} placement="top">
|
||||
<Tooltip
|
||||
key="notEmployeeToolTip"
|
||||
title={!isEmployee ? t("notifications.tooltips.not-employee") : ""}
|
||||
placement="top"
|
||||
>
|
||||
<span>
|
||||
<Button
|
||||
type={isWatching ? "primary" : "default"}
|
||||
|
||||
Reference in New Issue
Block a user