Update guides sort order
This commit is contained in:
1 parent
8fe4bc5472
commit
32c2bef9d8
3 files changed
+16
-11
No files matched your search
+6
-1
@@ -3,7 +3,12 @@ import authors from "data/authors";
|
||||
import siteConfig from "data/site";
|
||||
|
||||
export const getAllGuides = () => {
|
||||
return guides;
|
||||
return guides.filter(guide => !guide.draft)
|
||||
.sort((a, b) => new Date(b.updatedAt) - new Date(a.updatedAt));
|
||||
};
|
||||
|
||||
export const getFeaturedGuides = () => {
|
||||
return getAllGuides().filter(guide => guide.featured);
|
||||
};
|
||||
|
||||
export const getRequestedGuide = req => {
|
||||
|
||||
Reference in new issue
Block a user