mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-29 18:28:28 -04:00
- Renamed all instances of 'Activity' to 'Job' in views, controllers, and models. - Updated routes to reflect the change from activities to jobs. - Modified database schema to rename the activities table to jobs and adjusted related columns. - Updated locale files to change activity-related translations to jobs. - Adjusted tests to ensure they reference jobs instead of activities. - Removed the category field from jobs as they are now a plain list. - Updated seed data and sample data generation to create jobs instead of activities.
20 lines
760 B
React
20 lines
760 B
React
import React from 'react';
|
|
|
|
import ICONS from '../menuIcons.json';
|
|
|
|
// An action's `key` is not always the icon's name.
|
|
const ALIASES = {photo: 'add_photo', plan: 'job', deactivate: 'archive', activate: 'planting'};
|
|
|
|
// The green line icon of an actions menu item. The drawings are shared with the
|
|
// server-rendered menus (see MENU_ICONS in app/helpers/icons_helper.rb).
|
|
export default function MenuIcon({name}) {
|
|
const paths = ICONS[ALIASES[name] || name];
|
|
if (!paths) return null;
|
|
|
|
return (
|
|
<svg className="menu-icon" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"
|
|
dangerouslySetInnerHTML={{__html: paths}} />
|
|
);
|
|
}
|