Updated code
This commit is contained in:
@@ -8,6 +8,8 @@ import './Dashboard.css';
|
|||||||
import SendMessageWizardModal from './SendMessageWizard/SendMessageWizardModal';
|
import SendMessageWizardModal from './SendMessageWizard/SendMessageWizardModal';
|
||||||
import ViewContactWizardModal from './ViewContactWizard/ViewContactWizardModal';
|
import ViewContactWizardModal from './ViewContactWizard/ViewContactWizardModal';
|
||||||
|
|
||||||
|
import { APP_NAME } from '../constants/app';
|
||||||
|
|
||||||
const Dashboard = () => {
|
const Dashboard = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const [activeView, setActiveView] = useState('dashboard');
|
const [activeView, setActiveView] = useState('dashboard');
|
||||||
@@ -53,7 +55,7 @@ const Dashboard = () => {
|
|||||||
{/* Navbar */}
|
{/* Navbar */}
|
||||||
<nav className="dashboard-nav">
|
<nav className="dashboard-nav">
|
||||||
<div className="nav-logo">
|
<div className="nav-logo">
|
||||||
<span className="logo-text">textsender</span>
|
<span className="logo-text">{APP_NAME}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="nav-links">
|
<div className="nav-links">
|
||||||
<button
|
<button
|
||||||
@@ -62,12 +64,6 @@ const Dashboard = () => {
|
|||||||
>
|
>
|
||||||
Dashboard
|
Dashboard
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
className={`nav-link ${activeView === 'settings' ? 'active' : ''}`}
|
|
||||||
onClick={() => handleNavClick('settings')}
|
|
||||||
>
|
|
||||||
Settings
|
|
||||||
</button>
|
|
||||||
<button
|
<button
|
||||||
className={`nav-link ${activeView === 'profile' ? 'active' : ''}`}
|
className={`nav-link ${activeView === 'profile' ? 'active' : ''}`}
|
||||||
onClick={() => handleNavClick('profile')}
|
onClick={() => handleNavClick('profile')}
|
||||||
@@ -159,11 +155,6 @@ const Dashboard = () => {
|
|||||||
Dashboard view is active. Select one of the buttons above.
|
Dashboard view is active. Select one of the buttons above.
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
{activeView === 'settings' && (
|
|
||||||
<p className="view-text">
|
|
||||||
Settings view - Configuration options will go here.
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
{activeView === 'profile' && (
|
{activeView === 'profile' && (
|
||||||
<p className="view-text">
|
<p className="view-text">
|
||||||
Profile view - User information will go here.
|
Profile view - User information will go here.
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { useNavigate } from 'react-router-dom';
|
|||||||
|
|
||||||
import { tokenService } from '../services/TokenService';
|
import { tokenService } from '../services/TokenService';
|
||||||
import { userApi } from '../api/loginApi';
|
import { userApi } from '../api/loginApi';
|
||||||
|
import { APP_NAME } from '../constants/app';
|
||||||
|
|
||||||
import './ProfileForm.css';
|
import './ProfileForm.css';
|
||||||
|
|
||||||
@@ -224,7 +225,7 @@ const ProfileForm = () => {
|
|||||||
{/* Navbar */}
|
{/* Navbar */}
|
||||||
<nav className="dashboard-nav">
|
<nav className="dashboard-nav">
|
||||||
<div className="nav-logo">
|
<div className="nav-logo">
|
||||||
<span className="logo-text">Dashboard</span>
|
<span className="logo-text">{APP_NAME}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="nav-links">
|
<div className="nav-links">
|
||||||
<button
|
<button
|
||||||
@@ -233,12 +234,6 @@ const ProfileForm = () => {
|
|||||||
>
|
>
|
||||||
Dashboard
|
Dashboard
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
className={`nav-link ${activeView === 'settings' ? 'active' : ''}`}
|
|
||||||
onClick={() => handleNavClick('settings')}
|
|
||||||
>
|
|
||||||
Settings
|
|
||||||
</button>
|
|
||||||
<button
|
<button
|
||||||
className={`nav-link ${activeView === 'profile' ? 'active' : ''}`}
|
className={`nav-link ${activeView === 'profile' ? 'active' : ''}`}
|
||||||
onClick={() => handleNavClick('profile')}
|
onClick={() => handleNavClick('profile')}
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ export const DATA_KEY_ACCESS_TOKEN = 'access_token';
|
|||||||
export const DATA_KEY_REGISTERED_USER_ID = 'registered_user_id';
|
export const DATA_KEY_REGISTERED_USER_ID = 'registered_user_id';
|
||||||
export const DATA_KEY_USER_ID = 'user_id';
|
export const DATA_KEY_USER_ID = 'user_id';
|
||||||
export const DATA_KEY_ADDED_CONTACT_ID = 'added_contact_id';
|
export const DATA_KEY_ADDED_CONTACT_ID = 'added_contact_id';
|
||||||
|
export const APP_NAME = 'textsender';
|
||||||
|
|||||||
Reference in New Issue
Block a user