generated from github/codespaces-react
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Integrate official assistance roles and update README #31
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,156 @@ | ||
| import React, { useState } from 'react'; | ||
|
|
||
| const assistanceRoles = { | ||
| police: { | ||
| title: 'Police Assistance', | ||
| icon: '👮', | ||
| description: 'Civilian law enforcement and public safety services.', | ||
| tools: [ | ||
| { id: 'dispatch', name: 'Emergency Dispatch', icon: '📞', desc: 'Real-time coordination of emergency responses.' }, | ||
| { id: 'reporting', name: 'Incident Reporting', icon: '📝', desc: 'Secure portal for filing and tracking crime reports.' }, | ||
| { id: 'forensics', name: 'Forensic Analysis', icon: '🔬', desc: 'AI-assisted analysis of digital and physical evidence.' } | ||
| ] | ||
| }, | ||
| military: { | ||
| title: 'Military Assistance', | ||
| icon: '🪖', | ||
| description: 'National defense and strategic security operations.', | ||
| tools: [ | ||
| { id: 'dashboard', name: 'Strategic Dashboard', icon: '📊', desc: 'Global threat monitoring and resource allocation.' }, | ||
| { id: 'recon', name: 'Reconnaissance AI', icon: '🛰️', desc: 'Satellite and drone data processing for situational awareness.' }, | ||
| { id: 'comms', name: 'Tactical Comms', icon: '📡', desc: 'Encrypted communication channels for field operations.' } | ||
| ] | ||
| }, | ||
| gendarmery: { | ||
| title: 'Gendarmerie Assistance', | ||
| icon: '🛡️', | ||
| description: 'Military-force law enforcement for territorial and specialized security.', | ||
| tools: [ | ||
| { id: 'territory', name: 'Territorial Security', icon: '🗺️', desc: 'Regional patrol management and community safety.' }, | ||
| { id: 'traffic', name: 'Traffic Management', icon: '🚦', desc: 'Coordination of road safety and major transit routes.' }, | ||
| { id: 'response', name: 'Specialized Response', icon: '🚨', desc: 'Elite units for counter-terrorism and high-risk interventions.' } | ||
| ] | ||
| } | ||
| }; | ||
|
|
||
| export default function OfficialAssistance() { | ||
| const [activeRole, setActiveRole] = useState('police'); | ||
|
|
||
| return ( | ||
| <div className="assistance-container"> | ||
| <div className="role-selector"> | ||
| {Object.entries(assistanceRoles).map(([id, role]) => ( | ||
| <button | ||
| key={id} | ||
| className={`role-tab ${activeRole === id ? 'active' : ''}`} | ||
| onClick={() => setActiveRole(id)} | ||
| > | ||
| <span className="role-icon">{role.icon}</span> | ||
| {role.title} | ||
| </button> | ||
| ))} | ||
| </div> | ||
|
|
||
| <div className="role-content"> | ||
| <h2>{assistanceRoles[activeRole].title}</h2> | ||
| <p className="role-description">{assistanceRoles[activeRole].description}</p> | ||
|
|
||
| <div className="tool-list"> | ||
| {assistanceRoles[activeRole].tools.map((tool) => ( | ||
| <div key={tool.id} className="assistance-tool-card"> | ||
| <div className="tool-icon">{tool.icon}</div> | ||
| <div className="tool-info"> | ||
| <h3>{tool.name}</h3> | ||
| <p>{tool.desc}</p> | ||
| </div> | ||
| <button className="action-btn" onClick={() => alert(`Launching ${tool.name}...`)}>Launch</button> | ||
| </div> | ||
| ))} | ||
| </div> | ||
| </div> | ||
|
|
||
| <style jsx>{` | ||
| .assistance-container { | ||
| padding: 20px; | ||
| max-width: 1000px; | ||
| margin: 0 auto; | ||
| color: white; | ||
| } | ||
| .role-selector { | ||
| display: flex; | ||
| gap: 10px; | ||
| margin-bottom: 30px; | ||
| border-bottom: 1px solid #444; | ||
| padding-bottom: 10px; | ||
| } | ||
| .role-tab { | ||
| background: #333; | ||
| border: 1px solid #555; | ||
| color: white; | ||
| padding: 10px 20px; | ||
| border-radius: 8px 8px 0 0; | ||
| cursor: pointer; | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 10px; | ||
| font-weight: bold; | ||
| transition: background 0.2s; | ||
| } | ||
| .role-tab.active { | ||
| background: #61dafb; | ||
| color: #282c34; | ||
| border-color: #61dafb; | ||
| } | ||
| .role-content { | ||
| background: #282c34; | ||
| padding: 30px; | ||
| border-radius: 0 0 12px 12px; | ||
| border: 1px solid #444; | ||
| border-top: none; | ||
| } | ||
| .role-description { | ||
| color: #aaa; | ||
| margin-bottom: 30px; | ||
| font-style: italic; | ||
| } | ||
| .tool-list { | ||
| display: grid; | ||
| grid-template-columns: 1fr; | ||
| gap: 15px; | ||
| } | ||
| .assistance-tool-card { | ||
| display: flex; | ||
| align-items: center; | ||
| background: #333; | ||
| padding: 20px; | ||
| border-radius: 10px; | ||
| gap: 20px; | ||
| } | ||
| .tool-icon { | ||
| font-size: 2.5rem; | ||
| } | ||
| .tool-info { | ||
| flex-grow: 1; | ||
| } | ||
| .tool-info h3 { | ||
| margin: 0 0 5px 0; | ||
| color: #61dafb; | ||
| } | ||
| .tool-info p { | ||
| margin: 0; | ||
| color: #ccc; | ||
| font-size: 0.9rem; | ||
| } | ||
| .action-btn { | ||
| background: #61dafb; | ||
| color: #282c34; | ||
| border: none; | ||
| padding: 10px 20px; | ||
| border-radius: 5px; | ||
| font-weight: bold; | ||
| cursor: pointer; | ||
| } | ||
| `}</style> | ||
| </div> | ||
| ); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (typo): Consider correcting the
gendarmerykey spelling togendarmeriefor consistency.This mismatch between the key and the displayed label could be confusing, especially if these IDs are reused or matched by string elsewhere. Please rename the key to
gendarmerieand update all references for consistency.Suggested implementation:
gendarmerie: {There may be other references to the
gendarmerykey elsewhere in the codebase (e.g., lookups likedata.gendarmery, route params, tests, or analytics events). Please search the entire repository forgendarmeryand rename all occurrences togendarmerieto keep things consistent and avoid runtime bugs.