mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-18 11:36:44 +08:00
feat: add corresponding icons to files (#164)
This commit is contained in:
@ -3,12 +3,18 @@ import React from 'react';
|
||||
|
||||
interface IProps extends React.PropsWithChildren {
|
||||
documentId: string;
|
||||
preventDefault?: boolean;
|
||||
}
|
||||
|
||||
const NewDocumentLink = ({ children, documentId }: IProps) => {
|
||||
const NewDocumentLink = ({
|
||||
children,
|
||||
documentId,
|
||||
preventDefault = false,
|
||||
}: IProps) => {
|
||||
return (
|
||||
<a
|
||||
target="_blank"
|
||||
onClick={!preventDefault ? undefined : (e) => e.preventDefault()}
|
||||
href={`${api_host}/document/get/${documentId}`}
|
||||
rel="noreferrer"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user