Skip to content

Commit

Permalink
🐛 Blogg did not sort latest articles by publishDate
Browse files Browse the repository at this point in the history
  • Loading branch information
KenAJoh committed Jan 14, 2025
1 parent dd642d7 commit fd6e2b4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const BloggList = ({
return (
<div>
<div className="hidden gap-6 md:flex">
<div className="relative hidden aspect-square h-[11.75rem] lg:block">
<div className="relative hidden aspect-square h-[11.75rem] rounded-lg ring-1 ring-border-subtle lg:block">
{blogg?.seo?.image ? (
<Image
src={urlFor(blogg.seo.image).auto("format").url()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const HighlightedBlogg = ({
return (
<div>
<div className="col-span-1 hidden md:block">
<div className="relative mb-10 block aspect-video">
<div className="relative mb-10 block aspect-video rounded-lg ring-1 ring-border-subtle">
{blogg?.seo?.image ? (
<Image
src={urlFor(blogg.seo.image).quality(100).auto("format").url()}
Expand Down Expand Up @@ -64,7 +64,7 @@ export const HighlightedBlogg = ({
</div>
{/* Mobile view */}
<div className="w-full md:hidden">
<div className="relative mb-10 block aspect-video">
<div className="relative mb-10 block aspect-video rounded-lg ring-1 ring-border-subtle">
{blogg?.seo?.image ? (
<Image
src={urlFor(blogg.seo.image).quality(100).auto("format").url()}
Expand Down
2 changes: 1 addition & 1 deletion aksel.nav.no/website/pages/produktbloggen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type PageProps = NextPageT<{

export const query = `*[_type == "blogg_landingsside"][0]{
"page": {..., intro[]{...,${destructureBlocks}}},
"bloggposts": *[_type == "aksel_blogg"] | order(_createdAt desc){
"bloggposts": *[_type == "aksel_blogg"] | order(publishedAt desc, _createdAt desc){
seo,
heading,
ingress,
Expand Down

0 comments on commit fd6e2b4

Please sign in to comment.