Skip to content

Commit

Permalink
Add instagram to footer
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxwell Omdal committed Dec 17, 2023
1 parent 13568d9 commit 97e7885
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
4 changes: 3 additions & 1 deletion common/iconComponentMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ import present from '@/public/icon/present.svg';
import defaultIcon from '@/public/icon/default.svg';
import at_symbol from '@/public/icon/at_symbol.svg';
import user_group from '@/public/icon/user_group.svg';
import instagram from '@/public/icon/instagram.svg';
import { StaticImport } from 'next/dist/shared/lib/get-img-props';

const iconComponentMap: Map<string, JSX.Element> = new Map([
['meetup', meetup],
['present', present],
['at_symbol', at_symbol],
['user_group', user_group],
['instagram', instagram],
]);

export function getIconComponent(iconName: string): StaticImport {
return iconComponentMap.get(iconName) ?? defaultIcon;
}
}
20 changes: 13 additions & 7 deletions components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ export default function Footer() {
);
}

// const getLocationItem = () => {

// }
const getInstagramItem = () => {
return (
<a className="text-md text-tea_green hover:text-tea_green-400" href="https://www.instagram.com/sequoia.fabrica/">
<Icon iconName='instagram' />
<span className="pl-1 align-middle">Instagram</span>
</a>
);
}

const getEventsItem = () => {
return (
Expand Down Expand Up @@ -45,14 +50,15 @@ export default function Footer() {
}

const footerItems: JSX.Element[] = [
getContactItem(),
getDonationItem(),
getEventsItem(),
getInstagramItem(),
getDonationItem(),
getContactItem(),
getCodeOfConduct(),
];

return (
<footer className='footer bg-pigment_green-200 text-center dark:bg-neutral-700 lg:text-left'>
<footer className='footer bg-pigment_green-200 text-center lg:text-left'>
<div className='p-10'>
<div className='text-center flex flex-wrap'>
{footerItems.map((item, index) => (
Expand All @@ -61,7 +67,7 @@ export default function Footer() {
</div>
</div>
<div>
<p className="p-4 text-center text-tea_green dark:text-neutral-200">
<p className="p-4 text-center text-tea_green">
{copyright}
</p>
</div>
Expand Down
1 change: 1 addition & 0 deletions public/icon/instagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 97e7885

Please sign in to comment.