Skip to content

Commit

Permalink
Add new codec link (#308)
Browse files Browse the repository at this point in the history
* Add new codec link

* typo
  • Loading branch information
krystian50 authored Jan 24, 2025
1 parent c9d0fff commit bc9d324
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/MemoryPreview/MemoryRanges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ const findMemoryForWorkerRange = (rangeAddress: number): FindMemoryForWorkerType
};
};

const uint8ToHex = (value: Uint8Array) =>
"0x" +
Array.from(value)
.map((byte) => byte.toString(16).padStart(2, "0")) // Convert to hex and pad with leading zero if necessary
.join("");

interface RangeRow {
id: string;
start: number;
Expand Down Expand Up @@ -238,7 +244,7 @@ function MemoryRangeRow({
</PopoverTrigger>
<PopoverContent className="w-auto p-2">
<a
href={`https:codec.fluffylabs.dev?memory=${flatData}&numeralSystem=dec`}
href={`https://papi.fluffylabs.dev/?data=${uint8ToHex(flatData)}`}
target="_blank"
rel="noreferrer"
className="underline text-blue-600 block mb-2"
Expand Down

0 comments on commit bc9d324

Please sign in to comment.