forked from Transparency/kgroad-frontend2
added trycatch in news page, removed font Tilda-Sans
This commit is contained in:
1 parent
d6c6504d1f
commit
95ff16d48b
3 files changed
+16
-5
No files matched your search
@@ -4,7 +4,10 @@
|
||||
box-sizing: border-box;
|
||||
padding: 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,
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import type { Metadata } from "next";
|
||||
import "./globals.scss";
|
||||
import "./App.scss";
|
||||
import "@/shared/fonts/fonts.scss";
|
||||
// import "@/shared/fonts/fonts.scss";
|
||||
import { Providers } from "./Providers";
|
||||
import Navbar from "@/widgets/Navbar/Navbar";
|
||||
import Footer from "@/widgets/Footer/Footer";
|
||||
|
||||
+11
-3
@@ -1,14 +1,22 @@
|
||||
import Typography from "@/shared/ui/components/Typography/Typography";
|
||||
import "./News.scss";
|
||||
import Typography from "@/shared/ui/components/Typography/Typography";
|
||||
import { apiInstance } from "@/shared/config/apiConfig";
|
||||
import { INewsList } from "@/shared/types/news-type";
|
||||
import NewsCard from "@/entities/NewsCard/NewsCard";
|
||||
|
||||
const News = async () => {
|
||||
const getNews = async () => {
|
||||
const response = await apiInstance.get<INewsList>("/news/");
|
||||
try {
|
||||
const response = await apiInstance.get<INewsList>("/news/");
|
||||
|
||||
return response.data;
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
||||
return {
|
||||
results: [],
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
const data = await getNews();
|
||||
|
||||
Reference in new issue
Block a user