From 69a1de99e26e62dad6cd8cf5a665db3b7feaf764 Mon Sep 17 00:00:00 2001 From: powermaker450 Date: Mon, 9 Sep 2024 18:54:02 -0400 Subject: [PATCH] Save and log set endpoint --- src/components/EndpointDialong.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/components/EndpointDialong.tsx b/src/components/EndpointDialong.tsx index 7f2542f..a7be90a 100644 --- a/src/components/EndpointDialong.tsx +++ b/src/components/EndpointDialong.tsx @@ -44,6 +44,10 @@ const EndpointDialog = ({ endpoint }: EndpointDialogProps) => { return endpoint[0].startsWith("http://") || endpoint[0].startsWith("https://"); } + const saveEndpoint = () => { + localStorage.setItem("apiEndpoint", JSON.stringify(endpoint[0])); + } + return ( <> @@ -77,9 +81,15 @@ const EndpointDialog = ({ endpoint }: EndpointDialogProps) => {