fix: fix uploaded file time error #680 (#690)

### What problem does this PR solve?

fix: fix uploaded file time error #680
feat: support preview of word and excel #684 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2024-05-09 11:30:15 +08:00
committed by GitHub
parent 99be226c7c
commit 793e29f23a
18 changed files with 137 additions and 44 deletions

View File

@ -1,22 +1,24 @@
import { api_host } from '@/utils/api';
import React from 'react';
interface IProps extends React.PropsWithChildren {
documentId: string;
link: string;
preventDefault?: boolean;
color?: string;
}
const NewDocumentLink = ({
children,
documentId,
link,
preventDefault = false,
color = 'rgb(15, 79, 170)',
}: IProps) => {
return (
<a
target="_blank"
onClick={!preventDefault ? undefined : (e) => e.preventDefault()}
href={`${api_host}/document/get/${documentId}`}
href={link}
rel="noreferrer"
style={{ color }}
>
{children}
</a>