Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switched News Link Component #14

Merged
merged 1 commit into from
Sep 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading