update: route

This commit is contained in:
2025-09-26 11:07:03 +07:00
parent 27b060845b
commit c64b7b3490
11 changed files with 868 additions and 970 deletions

View File

@@ -9,44 +9,39 @@ const Home = () => {
const [isMobile, setIsMobile] = useState(window.innerWidth <= 768);
useEffect(() => {
const handleResize = () => {
setIsMobile(window.innerWidth <= 768);
};
const handleResize = () => setIsMobile(window.innerWidth <= 768);
window.addEventListener('resize', handleResize);
return () => window.removeEventListener('resize', handleResize);
}, []);
useEffect(() => {
const token = localStorage.getItem('token');
if (token) {
setBreadcrumbItems([
{
title: (
<Text strong style={{ fontSize: '14px' }}>
Dashboard
</Text>
),
},
{
title: (
<Text strong style={{ fontSize: '14px' }}>
Home
</Text>
),
},
]);
} else {
navigate('/signin');
}
setBreadcrumbItems([
{
title: (
<Text strong style={{ fontSize: '14px' }}>
Dashboard
</Text>
),
},
{
title: (
<Text strong style={{ fontSize: '14px' }}>
Home
</Text>
),
},
]);
}, []);
return (
<Card>
<Flex align="center" justify="center">
<Text strong style={{fontSize:'30px'}}>Wellcome Call Of Duty App</Text>
<Text strong style={{ fontSize: '30px' }}>
Welcome to Call Of Duty App
</Text>
</Flex>
</Card>
);
};
export default Home;
export default Home;