Skip to content

Commit

Permalink
policy for ios
Browse files Browse the repository at this point in the history
  • Loading branch information
Przemek committed Apr 24, 2024
1 parent 71edfe3 commit 1765c52
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/pages/static-page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ const StaticPage = () => {
const removeWord = (text: string) => {
return text.replace("Mobile", "");
};

const mainTabs = useMemo(() => {
let items = pages?.list?.data;

if (MOBILE_DEVICE === "true") {
items = pages?.list?.data.filter(
(item) =>
Expand All @@ -68,11 +70,13 @@ const StaticPage = () => {
}
return (
items &&
items.map((item) => ({
key: item.slug,
title: removeWord(item.title.substring(0, 50)),
url: item.slug,
}))
items // @ts-ignore
.filter((item) => item.active)
.map((item) => ({
key: item.slug,
title: removeWord(item.title.substring(0, 50)),
url: item.slug,
}))
);
}, [pages]);

Expand Down

0 comments on commit 1765c52

Please sign in to comment.