Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Project href,Added LINKS const #144

Merged
merged 6 commits into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { LINKS } from '@/config/consts';
import Link from 'next/link';
import { SVGProps } from 'react';

Expand All @@ -7,7 +8,7 @@ export default function NotFound() {
<h1>לא נמצא</h1>
<p>לא יכולנו למצוא את העמוד שביקשת</p>
<Link
href="/"
href={LINKS.HOME}
className="w-[250px] my-8 text-xs discord-btn rounded-full px-7 py-2 flex items-start justify-center gap-2 dark:hover:bg-purple-200 item-hover-transition"
>
בחזרה לדף הראשי
Expand Down
20 changes: 10 additions & 10 deletions components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,32 @@ import LinkedinIconLink from './LinkedinIconLink';
import TwitterIconLink from './TwitterIconLink';
import React from 'react';
import GithubIconLink from '@/components/Footer/GithubIconLink';
import { LINKS } from '@/config/consts';

const links = [
{
text: 'Contributors',
href: '/',
href: LINKS.CONTRIBUTORS,
},
{
text: 'הפרויקטים',
href: '/',
href: LINKS.PROJECTS,
},
{
text: 'Newbies',
href: '/',
href: LINKS.NEWBIES,
},
{
text: 'יצירת קשר',
href: '/',
href: LINKS.CONTACT_US,
},
{
text: 'Maintainers',
href: '/',
href: LINKS.COMMUNITY_MAINTAINERS,
},
{
text: 'מי אנחנו',
href: '/',
href: LINKS.ABOUT_US,
},
];

Expand Down Expand Up @@ -58,12 +59,11 @@ const Footer: React.FC = () => {
<LinkedinIconLink />
<TwitterIconLink />
</div>

<div className="flex justify-center w-full gap-2 text-center md:gap-4 lg:gap-6">
<Link className="text-sm" href="#">
<div className="flex justify-center w-full gap-10 text-center lg:gap-16">
<Link className="text-sm" href={LINKS.TERMS_OF_USE}>
תנאי שימוש
</Link>
<Link className="text-sm" href="#">
<Link className="text-sm" href={LINKS.PRIVACY_SETTINGS}>
הגדרות פרטיות
</Link>
</div>
Expand Down
7 changes: 4 additions & 3 deletions components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Link from 'next/link';
import SizeIndicator from './SizeIndicator';
import dynamic from 'next/dynamic';
import { NavDropdown } from './NavDropdown';
import { LINKS } from '@/config/consts';

const NavRightSide = dynamic(() => import('./NavRightSide'), {
ssr: false,
Expand All @@ -25,13 +26,13 @@ const Header: React.FC = () => {
<NavDropdown />
</li>
<li className="cursor-pointer body-roman">
<Link href="/projects">הפרויקטים</Link>
<Link href={LINKS.PROJECTS}>הפרויקטים</Link>
</li>
<li className="cursor-pointer body-roman">
<Link href="/about">מי אנחנו</Link>
<Link href={LINKS.ABOUT_US}>מי אנחנו</Link>
</li>
</ul>
<Link href="/">
<Link href={LINKS.HOME}>
<Image
src="/images/maakafLogo.png"
alt="maakafLogo"
Expand Down
14 changes: 6 additions & 8 deletions components/Maintainers/FaqsSection.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { LINKS } from '@/config/consts';
import Faqs from '../Common/Faqs';

const faqs = [
Expand Down Expand Up @@ -30,7 +31,7 @@ const faqs = [
טכנולוגיה. המון חברות מוכרות עובדות בקוד פתוח. עדיין יש ספקות? תמיד אפשר
להתייעץ{' '}
<span className="underline text-purple-500">
<a href="https://discord.com/invite/a2VyCjRk2M" target="_blank">
<a href={LINKS.DISCORD} target="_blank">
בדיסקורד.
</a>
</span>
Expand All @@ -43,7 +44,7 @@ const faqs = [
<p>
בהחלט! תוכלו תמיד להיעזר ולהתייעץ עם חברי וחברות קהילת הקוד הפתוח שלנו{' '}
<span className="underline text-purple-500">
<a href="https://discord.com/invite/a2VyCjRk2M" target="_blank">
<a href={LINKS.DISCORD} target="_blank">
בדיסקורד.
</a>
</span>
Expand All @@ -56,15 +57,12 @@ const faqs = [
<p>
הצטרפו לקהילה שלנו{' '}
<span className="underline text-purple-500">
<a href="https://discord.com/invite/a2VyCjRk2M" target="_blank">
<a href={LINKS.DISCORD} target="_blank">
בדיסקורד
</a>
</span>{' '}
<span className="underline text-purple-500">
<a
href="https://chat.whatsapp.com/E5a59DtSaHNBwnczxVW1FY"
target="_blank"
>
<a href={LINKS.WHATSAPP} target="_blank">
ובוואטספ
</a>
</span>
Expand Down Expand Up @@ -99,7 +97,7 @@ const faqs = [
<br />
לא לשכוח כמובן לשתף אותנו{' '}
<span className="underline text-purple-500">
<a href="https://discord.com/invite/a2VyCjRk2M" target="_blank">
<a href={LINKS.DISCORD} target="_blank">
בדיסקורד!
</a>
</span>
Expand Down
3 changes: 2 additions & 1 deletion components/MembersPics/MembersPics.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { LINKS } from '@/config/consts';
import Image from 'next/image';
import Link from 'next/link';

Expand Down Expand Up @@ -25,7 +26,7 @@ const CommunityLink = () => {
return (
<p className="text-3xl md:text-[60px] font-bold pr-5">
הכירו את חברי{' '}
<Link className="text-purple-500 hover:underline" href="/members">
<Link className="text-purple-500 hover:underline" href={LINKS.COMMUNITY_MEMBERS}>
הקהילה
Darkmift marked this conversation as resolved.
Show resolved Hide resolved
</Link>
</p>
Expand Down
5 changes: 3 additions & 2 deletions components/Newbies/FaqsSection.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { LINKS } from '@/config/consts';
import Faqs from '../Common/Faqs';

const faqs = [
Expand Down Expand Up @@ -56,13 +57,13 @@ const faqs = [
<p>
ממש אצלנו בקהילה!{' '}
<span className="underline text-purple-500">
<a href="/projects" target="_blank">
<a href={LINKS.PROJECTS} target="_blank">
בעמוד הפרויקטים
</a>
</span>{' '}
תוכלו למצוא מידע על פרויקטים בקוד פתוח במגוון שפות ותחומים. <br />
<span className="underline text-purple-500">
<a href="https://discord.com/invite/a2VyCjRk2M" target="_blank">
<a href={LINKS.DISCORD}target="_blank">
בדיסקורד שלנו
</a>
</span>{' '}
Expand Down
7 changes: 4 additions & 3 deletions components/Paths/Paths.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use client';

import { LINKS } from '@/config/consts';
import SectionTitle from '../Common/SectionTitle';
import PathItem from './PathItem';
import { motion } from 'framer-motion';
Expand All @@ -9,20 +10,20 @@ const paths = [
title: 'Newbies',
description:
'פעם ראשונה עם קוד פתוח? אל דאגה... בואו נבין ביחד מאיפה להתחיל',
link: { name: 'צעד ראשון', href: '/' },
link: { name: 'צעד ראשון', href: LINKS.NEWBIES },
btnColor: 'bg-pink-500',
},
{
title: 'Contributors',
description: 'מכירים כבר את הקונספט ורוצים להצטרף לקהילה? בבקשה',
link: { name: 'ערוץ דיסקורד', href: '/' },
link: { name: 'ערוץ דיסקורד', href: LINKS.DISCORD },
btnColor: 'bg-purple-500',
},
{
title: 'Maintainers',
description:
'יש לכם פרויקט שאתם רוצים לצרף למעקף? מלאו טופס הצטרפות ונתחיל',
link: { name: 'טופס הצטרפות', href: '/' },
link: { name: 'טופס הצטרפות', href: LINKS.COMMUNITY_MAINTAINERS },
btnColor: 'bg-green-500',
},
];
Expand Down
14 changes: 14 additions & 0 deletions config/consts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export const LINKS = {
NEWBIES: '/newbies',
COMMUNITY_MEMBERS: '/members',
CONTRIBUTORS: 'https://github.com/Maakaf/maakaf-website/graphs/contributors',
COMMUNITY_MAINTAINERS: '/maintainers',
PROJECTS: '/projects',
Darkmift marked this conversation as resolved.
Show resolved Hide resolved
CONTACT_US: '/not-found',
ABOUT_US: '/about',
HOME: '/',
TERMS_OF_USE: '/not-found',
PRIVACY_SETTINGS: '/not-found',
DISCORD: 'https://discord.com/invite/a2VyCjRk2M',
WHATSAPP: 'https://chat.whatsapp.com/E5a59DtSaHNBwnczxVW1FY',
};
Loading