mirror of
https://github.com/samkaraca/lazuri-doviguram.git
synced 2026-04-29 17:59:51 +00:00
Make Theme Preview sort based on createdAt propert. Fix Admin Editor Form youtube preview layout slip.
This commit is contained in:
parent
0063cecf5d
commit
ebf62192b2
@ -83,9 +83,7 @@ export default function EditorForm() {
|
||||
<YouTube
|
||||
style={{
|
||||
visibility: "hidden",
|
||||
position: "absolute",
|
||||
top: "999vh",
|
||||
left: "999vw",
|
||||
height: 0,
|
||||
}}
|
||||
videoId={
|
||||
getYouTubeID(youtubeVideoUrl.value) ??
|
||||
|
||||
@ -49,7 +49,9 @@ export default function AdminPage() {
|
||||
</Head>
|
||||
<LandingPageView
|
||||
home="/admin"
|
||||
themePreviews={themeMetas}
|
||||
themePreviews={themeMetas.sort((a, b) =>
|
||||
a.createdAt > b.createdAt ? 1 : -1
|
||||
)}
|
||||
createNewThemeButton={
|
||||
<button
|
||||
disabled={stalling}
|
||||
|
||||
@ -28,7 +28,9 @@ export async function getStaticProps() {
|
||||
if (res.status === "success" && res.data) {
|
||||
return {
|
||||
props: {
|
||||
themeMetas: res.data,
|
||||
themeMetas: res.data.sort((a, b) =>
|
||||
a.createdAt > b.createdAt ? 1 : -1
|
||||
),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user