small changes

This commit is contained in:
Yifei Hu 2024-07-09 10:24:27 +08:00
parent 676e2231b0
commit 858dc41ebb
2 changed files with 6 additions and 4 deletions

View file

@ -18,7 +18,9 @@ const NewsPage = () => {
const fetchNews = async () => { const fetchNews = async () => {
try { try {
console.log("Fetching news..."); console.log("Fetching news...");
const response = await fetch("https://raw.githubusercontent.com/TomorrowMC/newsDemoData/main/data.json"); const response = await fetch(
"https://raw.githubusercontent.com/newspedia-crew/newspedia-web/intern-change/public/data/index.json",
);
console.log("Response status:", response.status); console.log("Response status:", response.status);
if (!response.ok) { if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`); throw new Error(`HTTP error! status: ${response.status}`);

View file

@ -1,7 +1,7 @@
"use client"; "use client";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { BookOpenText, Home, Search, SquarePen, Settings, Rss } from "lucide-react"; import { BookOpenText, Home, Search, SquarePen, Settings, Newspaper } from "lucide-react";
import Link from "next/link"; import Link from "next/link";
import { useSelectedLayoutSegments } from "next/navigation"; import { useSelectedLayoutSegments } from "next/navigation";
import React, { useState, type ReactNode } from "react"; import React, { useState, type ReactNode } from "react";
@ -37,7 +37,7 @@ const Sidebar = ({ children }: { children: React.ReactNode }) => {
label: "Library", label: "Library",
}, },
{ {
icon: Rss, icon: Newspaper,
href: "/news", href: "/news",
active: segments.includes("news"), active: segments.includes("news"),
label: "News", label: "News",