Skip to content

Commit

Permalink
Merge pull request #14 from AI4Bharat/react-django
Browse files Browse the repository at this point in the history
Switched News Link Component
  • Loading branch information
Shanks0465 authored Sep 1, 2024
2 parents 6f7f655 + 0d13cd1 commit 5818587
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions frontend/components/NewsSection.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React from "react";
import { Box, Flex, Text, Heading, VStack, Link } from "@chakra-ui/react";
import { Box, Flex, Text, Heading, VStack } from "@chakra-ui/react";
import { useQuery } from "react-query";
import { API_URL } from "@/app/config";
import axios from "axios";
import { useEffect, useState } from "react";
import Image from "next/image";
import { imagePrefix } from "@/app/config";
import Link from "next/link";

const fetchNews = async () => {
try {
Expand Down Expand Up @@ -65,11 +66,8 @@ const News = () => {
<Box p={4}>
<Text fontWeight="bold">{card.title}</Text>
<Text noOfLines={4}>{card.description}</Text>
<Link
href={`${imagePrefix}/news/${card.id}`}
color={"a4borange"}
>
Read More
<Link href={`${imagePrefix}/news/${card.id}`}>
<Text textColor={"a4borange"}>Read More</Text>
</Link>
</Box>
</Box>
Expand Down

0 comments on commit 5818587

Please sign in to comment.