+
{
+ if (e.key === 'Enter' || e.key === ' ') {
+ handleClick();
+ e.preventDefault();
+ }
+ }}
+ >
+
+ {isDirectory && (expanded ?
+ :
+
+ )}
+
+
+ {getFileIcon()}
+
+
{node.name}
+
+
+ {isDirectory && expanded && (
+
+ {Object.values(node.children).map((childNode, index) => (
+
+ ))}
+
+ )}
+
+ );
+};
+
+export default FileExplorer;
\ No newline at end of file
diff --git a/src/components/pages/CodeEditorPage.jsx b/src/components/pages/CodeEditorPage.jsx
new file mode 100644
index 0000000..feb220a
--- /dev/null
+++ b/src/components/pages/CodeEditorPage.jsx
@@ -0,0 +1,70 @@
+import React, { useState, useEffect } from 'react';
+import { useParams } from 'react-router-dom';
+import CodeEditorLayout from '../codeEditor/CodeEditorLayout';
+
+// Mock project data
+const MOCK_PROJECT = {
+ id: '123',
+ name: 'Sample React Project',
+ description: 'A sample React project for demonstration',
+ gitUrl: 'https://github.com/username/sample-project',
+ createdAt: '2023-06-15T10:30:00Z',
+ updatedAt: '2023-06-20T14:45:00Z',
+};
+
+const CodeEditorPage = () => {
+ const { projectId } = useParams();
+ const [isLoading, setIsLoading] = useState(true);
+ const [error, setError] = useState(null);
+ const [project, setProject] = useState(null);
+
+ useEffect(() => {
+ const loadMockProject = async () => {
+ setIsLoading(true);
+ setError(null);
+
+ try {
+ // Simulate API delay
+ await new Promise(resolve => setTimeout(resolve, 600));
+ setProject(MOCK_PROJECT);
+ } catch (err) {
+ console.error('Error loading project:', err);
+ setError('Failed to load project details. Please try again.');
+ } finally {
+ setIsLoading(false);
+ }
+ };
+
+ loadMockProject();
+ }, [projectId]);
+
+ if (isLoading) {
+ return (
+