I am trying to sort my blog posts but unfortunately, I am getting a weird ordering no matter what. Code and screenshot below as well as console log output. Not sure if this is a prismic or a sveltekit issue but I did do an npm update and everything seems to be in order. Even tried first_publication_date desc
but still no luck.
<script context="module">
import PrismicDom from "prismic-dom";
import Client from "../../../utils/client";
import Prismic from "@prismicio/client";
export async function load() {
const document = await Client.query(
Prismic.Predicates.at("document.type", "blog_post"),
{ orderings: "[blog_post.last_publication_date]" }
);
return {
props: {
document,
},
};
}
</script>
2021-07-15T21:22:14+0000
2021-07-05T15:31:11+0000
2021-07-06T16:08:36+0000
2021-07-15T22:47:06+0000