Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jakdan99 committed Oct 22, 2024
1 parent b67ed82 commit da571bc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
9 changes: 1 addition & 8 deletions src/pages/Deployments/ParticipantRecord/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ const ParticipantRecord = ({
);
const participantDeviceType = primaryDevice.device.__type;
const deviceStatus = primaryDevice.__type.split(".").pop();
if (participantData.firstName === undefined) {
participantData.firstName = "";
}
if (participantData.lastName === undefined) {
participantData.lastName = "";
}

const lastDataUpload = useMemo(() => {
const lastData = participantData.dateOfLastDataUpload;
Expand All @@ -78,8 +72,7 @@ const ParticipantRecord = ({
>
<AccountIcon>
<Initials variant="h4">
{participantData.firstName === "" ||
participantData.firstName === null
{participantData.firstName
? participantRole[0]
: `${participantData.firstName[0]}${participantData.lastName[0]}`}
</Initials>
Expand Down
3 changes: 0 additions & 3 deletions src/pages/Participants/ImportParticipantsModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,13 @@ const ImportParticipantsModal = ({ open, onClose }: Props) => {
validationSchema.fields.file
.validate(theFile)
.then(async () => {
console.log("started callback");
await importEmailsFormik.setFieldTouched("file", true);
await importEmailsFormik.setFieldValue("file", theFile);
setFileName(theFile.name);
theFile.text().then(async (text: string) => {
console.log("inner callback");
await importEmailsFormik.setFieldTouched("emails", true);
importEmailsFormik.setFieldValue("emails", text);
const newEmails: string[] = [];
console.log("started callback 2");
Papa.parse(text, {
header: false,
complete: (results) => {
Expand Down

0 comments on commit da571bc

Please sign in to comment.