forked from Transparency/kgroad-frontend2
added trycatch in news page, removed font Tilda-Sans
This commit is contained in:
parent
d6c6504d1f
commit
95ff16d48b
@ -4,7 +4,10 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: "Tilda Sans";
|
font-family: system-ui, -apple-system, BlinkMacSystemFont,
|
||||||
|
"Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
|
||||||
|
"Helvetica Neue", sans-serif;
|
||||||
|
// font-family: "Tilda Sans";
|
||||||
}
|
}
|
||||||
|
|
||||||
button,
|
button,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import "./globals.scss";
|
import "./globals.scss";
|
||||||
import "./App.scss";
|
import "./App.scss";
|
||||||
import "@/shared/fonts/fonts.scss";
|
// import "@/shared/fonts/fonts.scss";
|
||||||
import { Providers } from "./Providers";
|
import { Providers } from "./Providers";
|
||||||
import Navbar from "@/widgets/Navbar/Navbar";
|
import Navbar from "@/widgets/Navbar/Navbar";
|
||||||
import Footer from "@/widgets/Footer/Footer";
|
import Footer from "@/widgets/Footer/Footer";
|
||||||
|
@ -1,14 +1,22 @@
|
|||||||
import Typography from "@/shared/ui/components/Typography/Typography";
|
|
||||||
import "./News.scss";
|
import "./News.scss";
|
||||||
|
import Typography from "@/shared/ui/components/Typography/Typography";
|
||||||
import { apiInstance } from "@/shared/config/apiConfig";
|
import { apiInstance } from "@/shared/config/apiConfig";
|
||||||
import { INewsList } from "@/shared/types/news-type";
|
import { INewsList } from "@/shared/types/news-type";
|
||||||
import NewsCard from "@/entities/NewsCard/NewsCard";
|
import NewsCard from "@/entities/NewsCard/NewsCard";
|
||||||
|
|
||||||
const News = async () => {
|
const News = async () => {
|
||||||
const getNews = async () => {
|
const getNews = async () => {
|
||||||
|
try {
|
||||||
const response = await apiInstance.get<INewsList>("/news/");
|
const response = await apiInstance.get<INewsList>("/news/");
|
||||||
|
|
||||||
return response.data;
|
return response.data;
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
|
||||||
|
return {
|
||||||
|
results: [],
|
||||||
|
};
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const data = await getNews();
|
const data = await getNews();
|
||||||
|
Loading…
Reference in New Issue
Block a user