mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 16:23:41 +08:00 
			
		
		
		
	Merge pull request #5495 from ConnectAI-E/Fix-code-duplication
Fix code duplication
This commit is contained in:
		@@ -128,8 +128,9 @@ export function PreCode(props: { children: any }) {
 | 
			
		||||
          className="copy-code-button"
 | 
			
		||||
          onClick={() => {
 | 
			
		||||
            if (ref.current) {
 | 
			
		||||
              const code = ref.current.innerText;
 | 
			
		||||
              copyToClipboard(code);
 | 
			
		||||
              copyToClipboard(
 | 
			
		||||
                ref.current.querySelector("code")?.innerText ?? "",
 | 
			
		||||
              );
 | 
			
		||||
            }
 | 
			
		||||
          }}
 | 
			
		||||
        ></span>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user