diff --git a/client/src/app/quotes/components/editors/QuoteDetailsCardEditor.tsx b/client/src/app/quotes/components/editors/QuoteDetailsCardEditor.tsx
index 3a192ba..9e50442 100644
--- a/client/src/app/quotes/components/editors/QuoteDetailsCardEditor.tsx
+++ b/client/src/app/quotes/components/editors/QuoteDetailsCardEditor.tsx
@@ -11,7 +11,7 @@ import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/ui";
import { CurrencyData, Language, Quantity } from "@shared/contexts";
import { ColumnDef } from "@tanstack/react-table";
import { t } from "i18next";
-import { ChevronDownIcon, ChevronUpIcon, Trash2Icon } from "lucide-react";
+import { ChevronDownIcon, ChevronUpIcon, CopyIcon, Trash2Icon } from "lucide-react";
import { useCallback, useState } from "react";
import { useFieldArray, useFormContext } from "react-hook-form";
import { useDetailColumns } from "../../hooks";
@@ -158,11 +158,11 @@ export const QuoteDetailsCardEditor = ({
rowActionFn: (props) => {
const { table, row } = props;
return [
- /*{
+ {
label: t("common.duplicate_row"),
icon: ,
onClick: () => table.options.meta?.duplicateItems(row.index),
- },*/
+ },
{
label: t("common.insert_row_above"),
icon: ,
diff --git a/client/src/components/ProtectedRoute/ProtectedRoute.tsx b/client/src/components/ProtectedRoute/ProtectedRoute.tsx
index 73a7630..610c39b 100644
--- a/client/src/components/ProtectedRoute/ProtectedRoute.tsx
+++ b/client/src/components/ProtectedRoute/ProtectedRoute.tsx
@@ -24,6 +24,13 @@ export const ProtectedRoute = ({ children }: ProctectRouteProps) => {
}
if (isSuccess && !authenticated) {
+ // Redirect them to the /login page, but save the current location they were
+ // trying to go to when they were redirected. This allows us to send them
+ // along to that page after they login, which is a nicer user experience
+ // than dropping them off on the home page.
+ return ;
+
+ console.log("No authenticated");
return (
{
const { success, redirectTo } = data;
if (success && redirectTo) {
+ console.log("redirect to /home");
navigate(redirectTo || "/home", { replace: false });
}
if (onSuccess) {