~chrono/personal-website-alyx

db13ac43b0af0df721920c61c72ad5fbb4a41c28 — Michael Gummere 4 months ago aa2645a
turn off sort for projects
1 files changed, 5 insertions(+), 6 deletions(-)

M components/Footer/Footer.tsx
M components/Footer/Footer.tsx => components/Footer/Footer.tsx +5 -6
@@ 34,8 34,8 @@ export default function Footer() {
      title: "Projects",
      children: [
        { name: "GitLab", href: "https://gitlab.com/Chrono-byte" },
        { name: "GitHub", href: "https://github.com/Chrono-byte" },
        { name: "sourcehut", href: "https://sr.ht/~chrono/" },
        { name: "GitHub", href: "https://github.com/Chrono-byte" },
      ],
    },
    {


@@ 82,7 82,7 @@ export default function Footer() {
    "lastfm",
  ];

  // sort in place by alphabetical order before building the iconsDisplay object
  // sort the categories by title
  menus.sort((a, b) => {
    return a.title.localeCompare(b.title);
  });


@@ 94,9 94,10 @@ export default function Footer() {
        enabledSocials.includes(child.name.toLocaleLowerCase());
    });

    // sort the socials
    // sort the socials by name
    menu.children.sort((a, b) => {
      return (a.name && b.name) ? a.name.localeCompare(b.name) : 0;
      if (menu.title === "Projects") return 0;
      return (b.name && a.name) ? a.name.localeCompare(b.name) : 0;
    });

    // add the menu to the iconsDisplay object


@@ 121,8 122,6 @@ export default function Footer() {
            ),
          );

          console.log(iconsDisplay[menu.title]);

          // remove the social from the list menu
          menu.children = menu.children.filter((child) => {
            return child.name !== name;