Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
55 changes: 55 additions & 0 deletions apps/web/src/app/applications/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
'use client';

import { RightSidebar } from '@/components/layout/RightSidebar';
import { FileText } from 'lucide-react';

export default function ApplicationsPage() {
return (
<div className="flex w-full min-h-screen">
<main className="flex flex-1 flex-col w-full min-h-screen px-5 pr-16">
<header className="flex items-center justify-between p-4 border-b border-gray-800">
<h1 className="text-2xl font-semibold text-white">Applications</h1>
</header>

<section className="flex-1 flex items-center justify-center px-4 pb-4">
<div className="max-w-3xl w-full text-center space-y-6">
<div className="flex justify-center mb-6">
<div className="w-20 h-20 rounded-full bg-[#0B1D39] flex items-center justify-center border-2 border-gray-700">
<FileText className="w-10 h-10 text-primary" />
</div>
</div>

<h2 className="text-3xl font-bold text-white">
Application Management
</h2>

<p className="text-gray-400 text-lg max-w-2xl mx-auto">
Here you'll see application and request lists soon. This feature will allow you to
manage guest applications and host booking requests all in one place.
</p>

<div className="bg-secondary rounded-xl p-6 mt-8 border border-gray-800">
<h3 className="text-xl font-semibold text-white mb-4">Coming Soon</h3>
<div className="space-y-3 text-left">
<div className="flex items-start space-x-3">
<div className="w-2 h-2 bg-blue-500 rounded-full mt-2" />
<p className="text-gray-300">View and manage booking applications</p>
</div>
<div className="flex items-start space-x-3">
<div className="w-2 h-2 bg-green-500 rounded-full mt-2" />
<p className="text-gray-300">Track application status in real-time</p>
</div>
<div className="flex items-start space-x-3">
<div className="w-2 h-2 bg-purple-500 rounded-full mt-2" />
<p className="text-gray-300">Respond to guest requests efficiently</p>
</div>
</div>
</div>
</div>
</section>
</main>

<RightSidebar />
</div>
);
}
47 changes: 0 additions & 47 deletions apps/web/src/hooks/useUserRole.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use client';

import { useEffect, useState } from 'react';
<<<<<<< HEAD
import { profileAPI } from '~/services/api';
import type { RoleInfo, UserRole } from '~/types/roles';
import { useAuth } from './auth/use-auth';
Expand All @@ -11,19 +10,12 @@ interface UseUserRoleReturn extends RoleInfo {
}

export function useUserRole(): UseUserRoleReturn {
=======
import type { RoleInfo, UserRole } from '~/types/roles';
import { useAuth } from './auth/use-auth';

export function useUserRole(): RoleInfo {
>>>>>>> 60310ea (feat: add stellar contract dependencies and integration setup)
const { user, isAuthenticated } = useAuth();
const [roleInfo, setRoleInfo] = useState<RoleInfo>({
role: 'guest',
canAccessHostDashboard: false,
hasProperties: false,
});
<<<<<<< HEAD
const [isLoading, setIsLoading] = useState(true);

useEffect(() => {
Expand Down Expand Up @@ -120,43 +112,4 @@ export function useUserRole(): RoleInfo {
}, [user, isAuthenticated]);

return { ...roleInfo, isLoading };
=======

useEffect(() => {
if (!isAuthenticated || !user) {
setRoleInfo({
role: 'guest',
canAccessHostDashboard: false,
hasProperties: false,
});
return;
}

// Check if user has host status in localStorage or from API
const storedHostStatus = localStorage.getItem('hostStatus');
const storedHasProperties = localStorage.getItem('hasProperties') === 'true';

let role: UserRole = 'guest';
let canAccessHostDashboard = false;

// User is a host if they have verified host status and properties
if (storedHostStatus === 'verified' && storedHasProperties) {
role = 'dual'; // Can be both guest and host
canAccessHostDashboard = true;
} else if (storedHostStatus === 'verified') {
// Verified but no properties yet
role = 'host';
canAccessHostDashboard = false; // No dashboard access without properties
}

setRoleInfo({
role,
hostStatus: storedHostStatus as 'pending' | 'verified' | 'rejected' | 'suspended' | undefined,
canAccessHostDashboard,
hasProperties: storedHasProperties,
});
}, [user, isAuthenticated]);

return roleInfo;
>>>>>>> 60310ea (feat: add stellar contract dependencies and integration setup)
}