mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-27 05:38:51 +01:00
refactor: Rename CodePreview component to ArtifactButton
This commit is contained in:
parent
48ddf4039e
commit
dc5b597a64
2 changed files with 4 additions and 4 deletions
|
|
@ -5,7 +5,7 @@ import { useSetRecoilState, useRecoilValue } from 'recoil';
|
|||
import type { Pluggable } from 'unified';
|
||||
import type { Artifact } from '~/common';
|
||||
import { artifactsState, artifactIdsState } from '~/store/artifacts';
|
||||
import CodePreview from './CodePreview';
|
||||
import ArtifactButton from './ArtifactButton';
|
||||
import { logger } from '~/utils';
|
||||
|
||||
export const artifactPlugin: Pluggable = () => {
|
||||
|
|
@ -118,5 +118,5 @@ export function Artifact({
|
|||
updateArtifact();
|
||||
}, [updateArtifact]);
|
||||
|
||||
return <CodePreview artifact={artifact} />;
|
||||
return <ArtifactButton artifact={artifact} />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { useLocalize } from '~/hooks';
|
|||
import { getFileType } from '~/utils';
|
||||
import store from '~/store';
|
||||
|
||||
const CodePreview = ({ artifact }: { artifact: Artifact | null }) => {
|
||||
const ArtifactButton = ({ artifact }: { artifact: Artifact | null }) => {
|
||||
const localize = useLocalize();
|
||||
const setArtifactId = useSetRecoilState(store.currentArtifactId);
|
||||
if (artifact === null || artifact === undefined) {
|
||||
|
|
@ -36,4 +36,4 @@ const CodePreview = ({ artifact }: { artifact: Artifact | null }) => {
|
|||
);
|
||||
};
|
||||
|
||||
export default CodePreview;
|
||||
export default ArtifactButton;
|
||||
Loading…
Add table
Add a link
Reference in a new issue