Skip to content

Commit

Permalink
Loading
Browse files Browse the repository at this point in the history
  • Loading branch information
thangved committed Jun 11, 2023
1 parent 01461c8 commit 8a82e83
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/pages/Changelog/index.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
import { HistoryOutlined } from "@ant-design/icons";
import { Avatar, Divider, List, Typography } from "antd";
import { Avatar, Divider, List, Typography, notification } from "antd";
import { Content } from "antd/lib/layout/layout";
import axios from "axios";
import React, { useEffect, useState } from "react";
import { useEffect, useState } from "react";
import { Helmet } from "react-helmet";

const Changelog = () => {
const [logList, setLogList] = useState([]);
const [loading, setLoading] = useState(false);

useEffect(() => {
const fetchData = async () => {
try {
setLoading(true);
const res = await axios.get(
"https://api.github.com/repos/thangved/w5-tools/commits"
);

setLogList(res.data);
} catch (error) {}
} catch (error) {
notification.error({
message: "Lỗi",
description: error.message,
});
} finally {
setLoading(false);
}
};

fetchData();
Expand All @@ -35,6 +44,7 @@ const Changelog = () => {
<Divider />

<List
loading={loading}
bordered
header="Nhật ký thay đổi"
dataSource={logList}
Expand Down

1 comment on commit 8a82e83

@vercel
Copy link

@vercel vercel bot commented on 8a82e83 Jun 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks for Deployment have failed

Please sign in to comment.