menambahkan halaman awal untuk setiap menu sidebar

This commit is contained in:
2025-10-03 17:05:50 +07:00
parent e3b7792f9b
commit d469992ee2
11 changed files with 337 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import React, { memo, useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import { useBreadcrumb } from '../../../layout/LayoutBreadcrumb';
import { Typography } from 'antd';
const { Text } = Typography;
const IndexBrandDevice = memo(function IndexBrandDevice() {
const navigate = useNavigate();
const { setBreadcrumbItems } = useBreadcrumb();
useEffect(() => {
const token = localStorage.getItem('token');
if (token) {
setBreadcrumbItems([
{ title: <Text strong style={{ fontSize: '14px' }}> Master</Text> },
{ title: <Text strong style={{ fontSize: '14px' }}>Brand Device</Text> }
]);
} else {
navigate('/signin');
}
}, []);
return (
<div>
<h1>Brand Device Page</h1>
</div>
);
});
export default IndexBrandDevice;

View File

@@ -0,0 +1,31 @@
import React, { memo, useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import { useBreadcrumb } from '../../../layout/LayoutBreadcrumb';
import { Typography } from 'antd';
const { Text } = Typography;
const IndexErrorCode = memo(function IndexErrorCode() {
const navigate = useNavigate();
const { setBreadcrumbItems } = useBreadcrumb();
useEffect(() => {
const token = localStorage.getItem('token');
if (token) {
setBreadcrumbItems([
{ title: <Text strong style={{ fontSize: '14px' }}> Master</Text> },
{ title: <Text strong style={{ fontSize: '14px' }}>Error Code</Text> }
]);
} else {
navigate('/signin');
}
}, []);
return (
<div>
<h1>Error Code Page</h1>
</div>
);
});
export default IndexErrorCode;

View File

@@ -0,0 +1,31 @@
import React, { memo, useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import { useBreadcrumb } from '../../../layout/LayoutBreadcrumb';
import { Typography } from 'antd';
const { Text } = Typography;
const IndexTag = memo(function IndexTag() {
const navigate = useNavigate();
const { setBreadcrumbItems } = useBreadcrumb();
useEffect(() => {
const token = localStorage.getItem('token');
if (token) {
setBreadcrumbItems([
{ title: <Text strong style={{ fontSize: '14px' }}> Master</Text> },
{ title: <Text strong style={{ fontSize: '14px' }}>Tag</Text> }
]);
} else {
navigate('/signin');
}
}, []);
return (
<div>
<h1>Tag Page</h1>
</div>
);
});
export default IndexTag;