MCPcopy Create free account
hub / github.com/triggerdotdev/jsonhero-web / PropertiesJwt

Function PropertiesJwt

app/components/Properties/PropertiesString.tsx:39–70  ·  view source on GitHub ↗
({
  value,
  format,
}: {
  value: string;
  format: JSONJWTStringFormat;
})

Source from the content-addressed store, hash-verified

37import { inferTemporal } from "~/utilities/inferredTemporal";
38
39function PropertiesJwt({
40 value,
41 format,
42}: {
43 value: string;
44 format: JSONJWTStringFormat;
45}) {
46 const properties: DataTableRow[] = [];
47
48 const decodedPayload = jwtDecode(value) as Record<string, any>;
49
50 for (const [key, value] of Object.entries(decodedPayload)) {
51 properties.push({
52 key: key,
53 value,
54 });
55 }
56
57 const decodedHeader = jwtDecode(value, { header: true }) as Record<
58 string,
59 any
60 >;
61
62 for (const [key, value] of Object.entries(decodedHeader)) {
63 properties.push({
64 key: key,
65 value,
66 });
67 }
68
69 return <DataTable rows={properties} />;
70}
71
72function PropertiesTimestamp({
73 value,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected