Skip to content

Commit

Permalink
delete husky fix SideBar mobile translate
Browse files Browse the repository at this point in the history
  • Loading branch information
roi1410 committed May 22, 2024
1 parent b4fc8b4 commit 56ab4b3
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 26 deletions.
2 changes: 1 addition & 1 deletion components/Header/NavRightSide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ const NavRightSide = () => {
</>
) : (
<div className="flex gap-3 items-center">
<LocalSwitcher />
<Darkmode />
<LocalSwitcher />
</div>
);
};
Expand Down
62 changes: 37 additions & 25 deletions components/Header/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { useEffect, useRef } from 'react';
import useFocusTrap from '../hooks/useFocusTrap';
import { useTheme } from 'next-themes';
import Link from 'next/link';
import LocalSwitcher from './LocalSwitcher';
import useTypedLocale from '@/hooks/useTypedLocale';

type NavigationItems = {
title: string;
Expand All @@ -18,38 +20,41 @@ type NavItem = {
text?: string;
};

const navigationItems: NavigationItems[] = [
{
title: 'Newbies',
text: 'פעם ראשונה בקוד פתוח',
linkPath: '/newbies',
},
{
title: 'Members',
text: 'מי שכבר התנסה בקוד פתוח',
linkPath: '/members',
},
{
title: 'Maintainers',
text: 'בעלי פרויקטים שרוצים להצטרף',
linkPath: '/maintainers',
},
{
title: 'מי אנחנו',
linkPath: '/about',
},
{
title: 'הפרויקטים',
linkPath: '/projects',
},
];

interface SidebarProps {
isOpen: boolean;
toggleSidebar: () => void;
}

const Sidebar: React.FC<SidebarProps> = ({ isOpen, toggleSidebar }) => {
const local = useTypedLocale()
const navigationItems: NavigationItems[] = [
{
title: local==="en"?'Newbies':"מתחילים",
text: local === "en" ? "new to open source":'פעם ראשונה בקוד פתוח',
linkPath: '/newbies',
},
{
title: local === "en" ? 'Members':"חברי קהילה",
text: local === "en" ? "Those who experienced open source ":'מי שכבר התנסה בקוד פתוח',
linkPath: '/members',
},
{
title: local === "en" ? 'Maintainers':"מתחזקי קהילה",
text: local === "en" ? "Project owners who want to join":'בעלי פרויקטים שרוצים להצטרף',
linkPath: '/maintainers',
},
{
title: local === "en" ? "Who We Are":'מי אנחנו',
linkPath: '/about',
},
{
title: local === "en" ? "Projects":'הפרויקטים',
linkPath: '/projects',
},
];


const sidebarRef = useRef<HTMLDivElement | null>(null);

const { theme } = useTheme();
Expand Down Expand Up @@ -90,7 +95,14 @@ const Sidebar: React.FC<SidebarProps> = ({ isOpen, toggleSidebar }) => {
{isOpen ? (
<div className="p-5 flex flex-col gap-14">
<div className="flex items-center justify-between">
<div className=' flex gap-2 p-1 items-center'>


<LocalSwitcher/>

<Darkmode />

</div>
<button onClick={toggleSidebar}>
{theme === 'dark' ? (
<Image
Expand Down
1 change: 1 addition & 0 deletions public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
"newbies": "First time in Open Source",
"members": "already participated in Open Source",
"maintainers": "Project maintainers who wants to join"

},
"Footer": {
"projects": "Projects",
Expand Down

0 comments on commit 56ab4b3

Please sign in to comment.