function previewPane()

in src/components/search/SearchResults.tsx [491:540]


  function previewPane() {
    return (
      <div className={previewPaneToggle ? "flex-child" : ""}>
        <Cards
          cardDefinition={{
            header: (item: { id: string; title: string; content: any }) => (
              <h4>{item.title}</h4>
            ),
            sections: [
              {
                content: (item) =>
                  item.id === "statusCode" ? (
                    item.content
                  ) : (
                    <ReactJson
                      src={item.content}
                      enableClipboard={(copy) => {
                        // Remove quotes when copying string
                        // https://github.com/mac-s-g/react-json-view/issues/217#issuecomment-459215632
                        const container = document.createElement("textarea");
                        const val: any = copy.src;

                        container.innerHTML =
                          typeof val === "string"
                            ? val
                            : JSON.stringify(val, null, 2);

                        document.body.appendChild(container);
                        container.select();
                        // copy the same quote-less value back to the clipboard
                        document.execCommand("copy");
                        document.body.removeChild(container);
                      }}
                    />
                  ),
              },
            ],
          }}
          cardsPerRow={[{ cards: 1 }]}
          items={[
            {
              id: "body",
              title: "Selected Item Preview",
              content: selectedJSON,
            },
          ]}
        />
      </div>
    );
  }