atproto explorer
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

recreate button

Juliet 3e288e87 3efcd458

+5 -8
+5 -8
src/components/create.tsx
··· 71 71 navigate(`/${res.data.uri}`); 72 72 }; 73 73 74 - const editRecord = async (formData: FormData) => { 74 + const editRecord = async (formData: FormData, recreate?: boolean) => { 75 75 const record = editorView.state.doc.toString(); 76 76 const validate = 77 77 formData.get("validate")?.toString() === "true" ? true ··· 81 81 const rpc = new Client({ handler: agent()! }); 82 82 try { 83 83 const editedRecord = JSON.parse(record); 84 - if (formData.get("recreate")) { 84 + if (recreate) { 85 85 const res = await rpc.post("com.atproto.repo.applyWrites", { 86 86 input: { 87 87 repo: agent()!.sub, ··· 320 320 </Modal> 321 321 <div class="flex items-center justify-end gap-2"> 322 322 <Show when={!props.create}> 323 - <div class="flex items-center gap-1"> 324 - <input id="recreate" name="recreate" type="checkbox" /> 325 - <label for="recreate" class="text-sm select-none"> 326 - Recreate record 327 - </label> 328 - </div> 323 + <Button onClick={() => editRecord(new FormData(formRef), true)}> 324 + Recreate 325 + </Button> 329 326 </Show> 330 327 <Button 331 328 onClick={() =>