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