Compare commits
3 Commits
20ee4d6957
...
e4ff4d5ae9
| Author | SHA1 | Date | |
|---|---|---|---|
| e4ff4d5ae9 | |||
| 982a03bf7e | |||
| bcd9318170 |
@@ -2,7 +2,7 @@
|
||||
"a address": "an address",
|
||||
"a email": "an email address",
|
||||
"a end date": "an end date",
|
||||
"a fistname": "a first name",
|
||||
"a firstname": "a first name",
|
||||
"a form": "a contract form",
|
||||
"a lastname": "a last name",
|
||||
"a name": "a name",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"a address": "une adresse",
|
||||
"a email": "une adresse email",
|
||||
"a end date": "une date de fin",
|
||||
"a fistname": "un prénom",
|
||||
"a firstname": "un prénom",
|
||||
"a form": "un formulaire de contrat",
|
||||
"a lastname": "un nom",
|
||||
"a name": "un nom",
|
||||
|
||||
@@ -4,7 +4,7 @@ import { IconDownload, IconX } from "@tabler/icons-react";
|
||||
import { t } from "@/config/i18n";
|
||||
import { useGetContractFile } from "@/services/api";
|
||||
import { useCallback } from "react";
|
||||
import { useNavigate } from "react-router";
|
||||
import { useNavigate, useSearchParams } from "react-router";
|
||||
|
||||
export type ContractRowProps = {
|
||||
contract: Contract;
|
||||
@@ -13,6 +13,7 @@ export type ContractRowProps = {
|
||||
export default function ContractRow({ contract }: ContractRowProps) {
|
||||
const getContractMutation = useGetContractFile();
|
||||
const navigate = useNavigate();
|
||||
const [searchParams] = useSearchParams();
|
||||
|
||||
const handleDownload = useCallback(async () => {
|
||||
getContractMutation.mutateAsync(contract.id);
|
||||
@@ -55,7 +56,9 @@ export default function ContractRow({ contract }: ContractRowProps) {
|
||||
mr="5"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
navigate(`/dashboard/contracts/${contract.id}/delete`);
|
||||
navigate(
|
||||
`/dashboard/contracts/${contract.id}/delete${searchParams ? `?${searchParams.toString()}` : ""}`,
|
||||
);
|
||||
}}
|
||||
>
|
||||
<IconX />
|
||||
|
||||
@@ -9,7 +9,7 @@ import { IconHome, IconLogin, IconLogout, IconSettings } from "@tabler/icons-rea
|
||||
|
||||
export function Navbar() {
|
||||
const { loggedUser: user, isLoading } = useAuth();
|
||||
const isPhone = useMediaQuery("(max-width: 760px");
|
||||
const isPhone = useMediaQuery("(max-width: 760px)");
|
||||
|
||||
if (!user && isLoading) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user