Skip to content

Commit

Permalink
Website fix
Browse files Browse the repository at this point in the history
  • Loading branch information
doombubbles committed Aug 25, 2024
1 parent a796c27 commit 4a98100
Show file tree
Hide file tree
Showing 5 changed files with 1,216 additions and 945 deletions.
4 changes: 2 additions & 2 deletions Website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"react-use": "^17.4.0",
"rehype": "^12.0.1",
"rehype-autolink-headings": "^6.1.1",
"rehype-components": "marekweb/rehype-components",
"rehype-components": "~0.3.0",
"rehype-highlight": "^6.0.0",
"rehype-parse": "^8.0.4",
"rehype-raw": "^6.1.1",
Expand All @@ -66,7 +66,7 @@
"@types/bootstrap": "^5.1.6",
"@types/lodash": "^4.14.194",
"@types/node": "18.15.11",
"@types/react": "^18.0.33",
"@types/react": "^18.2.79",
"@types/react-helmet": "^6.1.4",
"@types/semver": "^7.3.13",
"gh-pages": "^5.0.0",
Expand Down
Binary file removed Website/public/images/icon.png
Binary file not shown.
5 changes: 2 additions & 3 deletions Website/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import "../css/fonts.scss";
import "../css/global.scss";
import "../css/btd6.scss";
import { Btd6Styles } from "../components/btd6-ui";
import { SSRProvider } from "react-bootstrap";
import ModHelperHelmet from "../components/helmet";
import { use100vh } from "react-div-100vh";
import BackgroundImage, {
Expand All @@ -27,7 +26,7 @@ export default ({ Component, pageProps }: AppProps) => {
const background = useRef<HTMLDivElement>(null);

return (
<SSRProvider>
<>
<Btd6Styles />
<ModHelperHelmet title={DefaultTitle} description={DefaultDescription} />
<ModHelperScrollBars
Expand All @@ -41,6 +40,6 @@ export default ({ Component, pageProps }: AppProps) => {
</BackgroundImage>
</ScrollBarsContext.Provider>
</ModHelperScrollBars>
</SSRProvider>
</>
);
};
33 changes: 19 additions & 14 deletions Website/src/pages/mod-browser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {
} from "../lib/mod-browser";
import { useParam, useParamBool, useParamInt } from "../lib/routing";
import { useRouter } from "next/router";
import { chain, rangeRight } from "lodash";
import { chain, flow, rangeRight, sortBy } from "lodash";
import DropdownToggle from "react-bootstrap/DropdownToggle";
import DropdownMenu from "react-bootstrap/DropdownMenu";
import DropdownItem from "react-bootstrap/DropdownItem";
Expand Down Expand Up @@ -184,19 +184,24 @@ export default () => {

const filteredMods = useMemo(
() =>
chain(search ? fuse.search(search).map((value) => value.item) : mods)
.filter((data) => !modIsOld(data, oldCutoff))
.filter(
(data) =>
(showUnverified && !moddersData.current.forceVerifiedOnly) ||
moddersData.current.verified.includes(data.RepoOwner)
)
.filter(
(data) =>
!topic || topic === DefaultTopic || data.Topics.includes(topic)
)
.sortBy(sortMods(sortingMethod || SortingMethod.RecentlyUpdated))
.value(),
flow(
(mods) =>
search ? fuse.search(search).map((value) => value.item) : mods,
(mods) => mods.filter((data) => !modIsOld(data, oldCutoff)),
(mods) =>
mods.filter(
(data) =>
(showUnverified && !moddersData.current.forceVerifiedOnly) ||
moddersData.current.verified.includes(data.RepoOwner)
),
(mods) =>
mods.filter(
(data) =>
!topic || topic === DefaultTopic || data.Topics.includes(topic)
),
(mods) =>
sortBy(mods, sortMods(sortingMethod || SortingMethod.RecentlyUpdated))
)(mods),
[mods, sortingMethod, topic, search, showUnverified, oldCutoff]
);

Expand Down
Loading

0 comments on commit 4a98100

Please sign in to comment.