Skip to content

Commit

Permalink
firefox bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mluena committed Sep 17, 2024
1 parent 73847ea commit 141991e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions client/src/containers/collaborators/form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,8 @@ export default function CollaboratorForm() {

const { data } = useSession();
const user = data?.user;
const browsers = ["Chrome", "Firefox", "Edg", "OPR"]; // Array with common non-Safari browsers

const isSafari =
browsers.every((browser) => !userAgent.includes(browser)) && userAgent.includes("Safari");
const isChrome = userAgent.includes("Chrome");

const { data: meData } = useGetUsersId(`${user?.id}`, {
populate: "role",
Expand Down Expand Up @@ -356,6 +354,7 @@ export default function CollaboratorForm() {
: getObjectDifferences(collaboratorData?.data?.attributes, form.getValues());

const suggestionStatus = collaboratorSuggestedDataId?.data?.attributes?.review_status;

return (
<>
<DashboardFormControls
Expand Down Expand Up @@ -525,7 +524,7 @@ export default function CollaboratorForm() {
src="/images/image-file.png"
className="m-auto flex"
/>
{!previousData?.image?.data?.attributes?.url && isSafari && (
{!previousData?.image?.data?.attributes?.url && !isChrome && (
<div className="flex flex-col space-y-2 text-center font-semibold">
<div>
Drag and drop here, or{" "}
Expand All @@ -536,7 +535,7 @@ export default function CollaboratorForm() {
<p className="font-light">Supports: PNG, JPG, JPEG, GIF, WEBP</p>
</div>
)}
{!previousData?.image?.data?.attributes?.url && !isSafari && (
{!previousData?.image?.data?.attributes?.url && isChrome && (
<div className="flex flex-col space-y-2 text-center">
<p className="font-semibold">
Drag and drop here, or <span className="text-primary">browse</span>
Expand Down

0 comments on commit 141991e

Please sign in to comment.