Changed "token" param to "hash" and used hex encoding for URL

This commit is contained in:
x032205
2025-05-19 10:48:58 -04:00
parent 9fd37ca456
commit 0401793d38
6 changed files with 21 additions and 21 deletions
@@ -42,9 +42,9 @@ export const ViewSharedSecretByIDPage = () => {
from: ROUTE_PATHS.Public.ViewSharedSecretByIDPage.id,
select: (el) => el.email
});
const token = useSearch({
const hash = useSearch({
from: ROUTE_PATHS.Public.ViewSharedSecretByIDPage.id,
select: (el) => el.token
select: (el) => el.hash
});
const [password, setPassword] = useState<string>();
const { hashedHex, key } = extractDetailsFromUrl(urlEncodedKey);
@@ -59,7 +59,7 @@ export const ViewSharedSecretByIDPage = () => {
hashedHex,
password,
email,
token
hash
});
const navigate = useNavigate();
@@ -9,7 +9,7 @@ import { ViewSharedSecretByIDPage } from "./ViewSharedSecretByIDPage";
const SharedSecretByIDPageQuerySchema = z.object({
key: z.string().catch(""),
email: z.string().optional(),
token: z.string().optional()
hash: z.string().optional()
});
export const Route = createFileRoute("/shared/secret/$secretId")({