Skip to content

Commit

Permalink
Fix: set order of posts in admin page as most recently updated first
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilalekha committed Jul 19, 2021
1 parent 669f761 commit 64b2620
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pages/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@ import React, { useEffect, useState } from "react";
import Head from "next/head";
import SiteHeader from "../component/layout/SiteHeader/SiteHeader";
import Pagination from "../component/pagination/pagination";
import Navbar from "../component/myblogs/Navbar";
import MyBlogs from "../component/myblogs/MyBlogs";
import MyBlogsstyles from "../styles/MyBlogs.module.css";
import Cookies from "universal-cookie";
import PostService from "../services/PostService";
import AdminNavbar from "../component/admin/AdminNavbar";
import AdminBlogsList from "../component/admin/AdminBlogsList";
import { getCookieValue } from "../lib/cookie";
import { serverUrl } from "../config/config";

export async function getServerSideProps(context) {
try {
Expand Down Expand Up @@ -65,7 +62,7 @@ const Admin = (props) => {
skip: 0,
optionsCategory: "",
optionsStatus: "",
order: 1,
order: -1,
fieldName: "updatedAt"
});
const [loaded, setLoaded] = useState(false);
Expand Down

0 comments on commit 64b2620

Please sign in to comment.