Skip to content

Commit

Permalink
Added Next Imagge to Datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
Shanks0465 committed Aug 28, 2024
1 parent 9bd56f5 commit e0cff72
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions frontend/components/Datasets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ import axios from "axios";
import { useQuery } from "react-query";
import { API_URL } from "@/app/config";
import { imagePrefix } from "@/app/config";
import { FaFileAudio, FaFileAlt } from "react-icons/fa";

const datasetIcons: { [key: string]: React.ReactElement } = {
nmt: <FaFileAlt color="orange" size={25} />,
llm: <FaFileAlt color="orange" size={25} />,
asr: <FaFileAudio color="orange" size={25} />,
tts: <FaFileAudio color="orange" size={25} />,
xlit: <FaFileAlt color="orange" size={25} />,
};

interface FeatureProps {
title: string;
Expand Down Expand Up @@ -58,7 +67,7 @@ const Feature = ({ title, icon }: FeatureProps) => {
bg={"gray.100"}
mb={1}
>
<Image src={icon} alt="Icon" width={50} height={50} />
{datasetIcons[icon]}
</Flex>
<Text fontWeight={600}>{title}</Text>
</Stack>
Expand Down Expand Up @@ -159,7 +168,7 @@ export default function Datasets() {
<Card key={dataset.title} border={"solid"} borderColor={"orange"}>
<CardBody>
<Feature
icon={`${imagePrefix}/assets/icons/llm.png`}
icon={dataset.area.toLowerCase()}
title={dataset.title}
/>
</CardBody>
Expand Down

0 comments on commit e0cff72

Please sign in to comment.