From 704ae5881f8c221dbd6301007be97a5261d1c9db Mon Sep 17 00:00:00 2001 From: "$@#il" Date: Sun, 28 Sep 2025 01:51:25 +0530 Subject: [PATCH 1/3] check reliability --- src/components/pages/CodeEditorPage.jsx | 70 ------------------- src/components/pages/SingleProjectDetails.jsx | 18 +---- 2 files changed, 3 insertions(+), 85 deletions(-) delete mode 100644 src/components/pages/CodeEditorPage.jsx diff --git a/src/components/pages/CodeEditorPage.jsx b/src/components/pages/CodeEditorPage.jsx deleted file mode 100644 index feb220a..0000000 --- a/src/components/pages/CodeEditorPage.jsx +++ /dev/null @@ -1,70 +0,0 @@ -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 ( -
-
-
-

Loading project...

-
-
- ); - } - - if (error) { - return ( -
-
-

Error

-

{error}

-
-
- ); - } - - return ( -
- -
- ); -}; - -export default CodeEditorPage; \ No newline at end of file diff --git a/src/components/pages/SingleProjectDetails.jsx b/src/components/pages/SingleProjectDetails.jsx index ff8f41c..d8c3c39 100644 --- a/src/components/pages/SingleProjectDetails.jsx +++ b/src/components/pages/SingleProjectDetails.jsx @@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react'; import { useParams, useNavigate } from 'react-router-dom'; import './SingleProjectDetails.css'; import { motion } from 'framer-motion'; -import { FaGithub, FaCode } from 'react-icons/fa'; +import { FaGithub } from 'react-icons/fa'; import { Button } from '@/components/ui/button'; import { Table, @@ -12,7 +12,7 @@ import { TableHead, TableHeader, TableRow, -} from "@/components/ui/table" +} from "@/components/ui/table"; // Mock project data const MOCK_PROJECT = { @@ -48,7 +48,6 @@ const MOCK_DEPLOYMENTS = [ ]; const SingleProjectDetails = () => { - const API_URL = import.meta.env.VITE_API_BASE_URL || 'http://localhost:5000'; const { id } = useParams(); const navigate = useNavigate(); const [project, setProject] = useState(null); @@ -75,10 +74,6 @@ const SingleProjectDetails = () => { loadMockData(); }, [id]); - const handleViewCode = () => { - navigate(`/editor/${id}`); - }; - const handleDeploy = () => { navigate(`/service/${id}`); }; @@ -110,17 +105,10 @@ const SingleProjectDetails = () => { {/* Action Buttons */}
- From 2a45aa1975fe5b7760b9434bda166bcb1025caf7 Mon Sep 17 00:00:00 2001 From: "$@#il" Date: Sun, 28 Sep 2025 02:01:00 +0530 Subject: [PATCH 2/3] Update CI/CD workflows to use chk_cicd branch instead of main --- .github/workflows/deploy.yml | 2 +- .github/workflows/node.js.yml | 4 +- package-lock.json | 48 --- package.json | 3 - src/App.jsx | 8 +- src/components/NavBar.jsx | 4 +- .../codeEditor/CodeEditorLayout.jsx | 296 ------------------ src/components/codeEditor/Editor.jsx | 152 --------- src/components/codeEditor/FileExplorer.jsx | 158 ---------- src/components/ui/resizable.jsx | 66 ---- yarn.lock | 33 +- 11 files changed, 7 insertions(+), 767 deletions(-) delete mode 100644 src/components/codeEditor/CodeEditorLayout.jsx delete mode 100644 src/components/codeEditor/Editor.jsx delete mode 100644 src/components/codeEditor/FileExplorer.jsx delete mode 100644 src/components/ui/resizable.jsx diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8fc26a0..ba6c4e2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,7 +3,7 @@ name: Deploy Frontend to AWS S3 & CloudFront on: push: branches: - - main + - chk_cicd jobs: deploy: diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 7c4b271..68df7cc 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,9 +5,9 @@ name: Node.js CI on: push: - branches: [ "main" ] + branches: [ "chk_cicd" ] pull_request: - branches: [ "main" ] + branches: [ "chk_cicd" ] jobs: build: diff --git a/package-lock.json b/package-lock.json index f04e1f5..dedb560 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,6 @@ "dependencies": { "@fortawesome/fontawesome-free": "^6.7.2", "@heroicons/react": "^2.2.0", - "@monaco-editor/react": "^4.7.0", "@radix-ui/react-avatar": "^1.1.2", "@radix-ui/react-dropdown-menu": "^2.1.4", "@radix-ui/react-icons": "^1.3.2", @@ -29,13 +28,11 @@ "gsap": "^3.12.7", "jwt-decode": "^4.0.0", "lucide-react": "^0.460.0", - "monaco-editor": "^0.52.2", "path": "^0.12.7", "react": "^18.3.1", "react-dom": "^18.3.1", "react-icons": "^5.4.0", "react-intersection-observer": "^9.15.1", - "react-resizable-panels": "^3.0.3", "react-router-dom": "^6.28.0", "react-type-animation": "^3.2.0", "recharts": "^2.15.0", @@ -1220,29 +1217,6 @@ "integrity": "sha512-CZWV/q6TTe8ta61cZXjfnnHsfWIdFhms03M9T7Cnd5y2mdpylJM0rF1qRq+wsQVRMLz1OYPVEBU9ph2Bx8cxrg==", "license": "Apache-2.0" }, - "node_modules/@monaco-editor/loader": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@monaco-editor/loader/-/loader-1.5.0.tgz", - "integrity": "sha512-hKoGSM+7aAc7eRTRjpqAZucPmoNOC4UUbknb/VNoTkEIkCPhqV8LfbsgM1webRM7S/z21eHEx9Fkwx8Z/C/+Xw==", - "license": "MIT", - "dependencies": { - "state-local": "^1.0.6" - } - }, - "node_modules/@monaco-editor/react": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@monaco-editor/react/-/react-4.7.0.tgz", - "integrity": "sha512-cyzXQCtO47ydzxpQtCGSQGOC8Gk3ZUeBXFAxD+CWXYFo5OqZyZUonFl0DwUlTyAfRHntBfw2p3w4s9R6oe1eCA==", - "license": "MIT", - "dependencies": { - "@monaco-editor/loader": "^1.5.0" - }, - "peerDependencies": { - "monaco-editor": ">= 0.25.0 < 1", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" - } - }, "node_modules/@monogrid/gainmap-js": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@monogrid/gainmap-js/-/gainmap-js-3.1.0.tgz", @@ -6640,12 +6614,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/monaco-editor": { - "version": "0.52.2", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.52.2.tgz", - "integrity": "sha512-GEQWEZmfkOGLdd3XK8ryrfWz3AIP8YymVXiPHEdewrUq7mh0qrKrfHLNCXcbB6sTnMLnOZ3ztSiKcciFUkIJwQ==", - "license": "MIT" - }, "node_modules/motion-dom": { "version": "11.18.1", "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-11.18.1.tgz", @@ -7583,16 +7551,6 @@ } } }, - "node_modules/react-resizable-panels": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/react-resizable-panels/-/react-resizable-panels-3.0.3.tgz", - "integrity": "sha512-7HA8THVBHTzhDK4ON0tvlGXyMAJN1zBeRpuyyremSikgYh2ku6ltD7tsGQOcXx4NKPrZtYCm/5CBr+dkruTGQw==", - "license": "MIT", - "peerDependencies": { - "react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc", - "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" - } - }, "node_modules/react-router": { "version": "6.28.0", "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.28.0.tgz", @@ -8200,12 +8158,6 @@ "node": ">=0.10.0" } }, - "node_modules/state-local": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/state-local/-/state-local-1.0.7.tgz", - "integrity": "sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==", - "license": "MIT" - }, "node_modules/stats-gl": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/stats-gl/-/stats-gl-2.4.2.tgz", diff --git a/package.json b/package.json index ff98f09..0c6b3bd 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "dependencies": { "@fortawesome/fontawesome-free": "^6.7.2", "@heroicons/react": "^2.2.0", - "@monaco-editor/react": "^4.7.0", "@radix-ui/react-avatar": "^1.1.2", "@radix-ui/react-dropdown-menu": "^2.1.4", "@radix-ui/react-icons": "^1.3.2", @@ -31,13 +30,11 @@ "gsap": "^3.12.7", "jwt-decode": "^4.0.0", "lucide-react": "^0.460.0", - "monaco-editor": "^0.52.2", "path": "^0.12.7", "react": "^18.3.1", "react-dom": "^18.3.1", "react-icons": "^5.4.0", "react-intersection-observer": "^9.15.1", - "react-resizable-panels": "^3.0.3", "react-router-dom": "^6.28.0", "react-type-animation": "^3.2.0", "recharts": "^2.15.0", diff --git a/src/App.jsx b/src/App.jsx index 6a03eec..4d31bef 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -14,7 +14,6 @@ import DeploymentProgress from './components/pages/DeploymentProgress'; import DeployForm from './components/pages/DeployForm'; import LoginPage from './components/LoginPage'; import ProjectLister from './components/pages/ProjectLister'; -import CodeEditorPage from './components/pages/CodeEditorPage'; import NavBar from './components/NavBar'; import Footer from './components/Footer'; import { useUser } from './context/userContext'; @@ -56,14 +55,9 @@ function AppContent() { } /> } /> - - - // - } /> - {location.pathname !== '/login' && location.pathname !== '/editor/:projectId' &&
} + {location.pathname !== '/login' &&
} ); } diff --git a/src/components/NavBar.jsx b/src/components/NavBar.jsx index 949ea8e..aefc6c8 100644 --- a/src/components/NavBar.jsx +++ b/src/components/NavBar.jsx @@ -2,7 +2,7 @@ import React, { useState } from "react"; import { Button } from "@/components/ui/button"; import { useNavigate } from "react-router-dom"; import { useUser } from "../context/userContext"; -import { FaUserCircle, FaSignOutAlt, FaSignInAlt, FaUserPlus, FaBars, FaTimes, FaCode } from "react-icons/fa"; +import { FaUserCircle, FaSignOutAlt, FaSignInAlt, FaUserPlus, FaBars, FaTimes } from "react-icons/fa"; import { FiHome, FiFolder, FiInfo, FiMail } from "react-icons/fi"; const NavBar = () => { @@ -43,7 +43,6 @@ const NavBar = () => { {[ { name: "Home", icon: FiHome, path: "/" }, { name: "My Projects", icon: FiFolder, path: "/projects" }, - { name: "Code Editor", icon: FaCode, path: "/editor/123" }, { name: "About Us", icon: FiInfo, path: "/about" }, { name: "Contact Us", icon: FiMail, path: "/contact" } ].map(({ name, icon: Icon, path }) => ( @@ -107,7 +106,6 @@ const NavBar = () => { {[ { name: "Home", icon: FiHome, path: "/" }, { name: "My Projects", icon: FiFolder, path: "/projects" }, - { name: "Code Editor", icon: FaCode, path: "/editor/123" }, { name: "About Us", icon: FiInfo, path: "/about" }, { name: "Contact Us", icon: FiMail, path: "/contact" } ].map(({ name, icon: Icon, path }) => ( diff --git a/src/components/codeEditor/CodeEditorLayout.jsx b/src/components/codeEditor/CodeEditorLayout.jsx deleted file mode 100644 index 8d46722..0000000 --- a/src/components/codeEditor/CodeEditorLayout.jsx +++ /dev/null @@ -1,296 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from '../ui/resizable'; -import FileExplorer from './FileExplorer'; -import Editor from './Editor'; -import { Tabs, TabsContent, TabsList, TabsTrigger } from '../ui/tabs'; -import { Loader2, AlertCircle } from 'lucide-react'; -import { Alert, AlertDescription, AlertTitle } from '../ui/alert'; - -// Mock data for files -const MOCK_FILES = [ - { id: '1', name: 'index.js', path: 'src/index.js', type: 'file' }, - { id: '2', name: 'App.jsx', path: 'src/App.jsx', type: 'file' }, - { id: '3', name: 'components', path: 'src/components', type: 'directory' }, - { id: '4', name: 'Button.jsx', path: 'src/components/Button.jsx', type: 'file' }, - { id: '5', name: 'Card.jsx', path: 'src/components/Card.jsx', type: 'file' }, - { id: '6', name: 'utils', path: 'src/utils', type: 'directory' }, - { id: '7', name: 'helpers.js', path: 'src/utils/helpers.js', type: 'file' }, - { id: '8', name: 'constants.js', path: 'src/utils/constants.js', type: 'file' }, - { id: '9', name: 'package.json', path: 'package.json', type: 'file' }, - { id: '10', name: 'README.md', path: 'README.md', type: 'file' }, -]; - -// Mock file content -const MOCK_FILE_CONTENTS = { - '1': `import React from 'react'; -import ReactDOM from 'react-dom/client'; -import './index.css'; -import App from './App'; - -const root = ReactDOM.createRoot(document.getElementById('root')); -root.render( - - - -);`, - '2': `import React from 'react'; -import { Button } from './components/Button'; -import { Card } from './components/Card'; -import './App.css'; - -function App() { - return ( -
-
-

Welcome to My React App

- -

Edit src/App.js and save to reload.

- -
-
-
- ); -} - -export default App;`, - '4': `import React from 'react'; -import './Button.css'; - -export const Button = ({ children, onClick, variant = 'primary' }) => { - return ( - - ); -};`, - '5': `import React from 'react'; -import './Card.css'; - -export const Card = ({ title, children }) => { - return ( -
- {title &&

{title}

} -
- {children} -
-
- ); -};`, - '7': `// Helper functions - -/** - * Format a date to a readable string - * @param {Date} date - The date to format - * @returns {string} Formatted date string - */ -export const formatDate = (date) => { - return new Intl.DateTimeFormat('en-US', { - year: 'numeric', - month: 'long', - day: 'numeric' - }).format(date); -}; - -/** - * Truncate a string if it's longer than maxLength - * @param {string} str - The string to truncate - * @param {number} maxLength - Maximum length before truncating - * @returns {string} Truncated string - */ -export const truncate = (str, maxLength = 100) => { - if (str.length <= maxLength) return str; - return str.slice(0, maxLength) + '...'; -};`, - '8': `// Application constants - -export const API_BASE_URL = process.env.NODE_ENV === 'production' - ? 'https://api.example.com' - : 'http://localhost:5000'; - -export const THEMES = { - LIGHT: 'light', - DARK: 'dark', - SYSTEM: 'system' -}; - -export const MAX_FILE_SIZE = 5 * 1024 * 1024; // 5MB in bytes`, - '9': `{ - "name": "my-react-app", - "version": "0.1.0", - "private": true, - "dependencies": { - "@testing-library/jest-dom": "^5.16.5", - "@testing-library/react": "^13.4.0", - "@testing-library/user-event": "^13.5.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-scripts": "5.0.1", - "web-vitals": "^2.1.4" - }, - "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", - "eject": "react-scripts eject" - }, - "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - } -}`, - '10': `# My React App - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### \`npm start\` - -Runs the app in the development mode. -Open [http://localhost:3000](http://localhost:3000) to view it in your browser. - -### \`npm test\` - -Launches the test runner in the interactive watch mode. - -### \`npm run build\` - -Builds the app for production to the \`build\` folder.` -}; - -const CodeEditorLayout = ({ projectId }) => { - const [files, setFiles] = useState([]); - const [selectedFile, setSelectedFile] = useState(null); - const [fileContent, setFileContent] = useState(''); - const [isLoading, setIsLoading] = useState(true); - const [error, setError] = useState(null); - const [activeTab, setActiveTab] = useState('explorer'); - - // Load mock files with a simulated delay - useEffect(() => { - const loadMockFiles = async () => { - setIsLoading(true); - setError(null); - - try { - // Simulate API delay - await new Promise(resolve => setTimeout(resolve, 800)); - setFiles(MOCK_FILES); - } catch (err) { - console.error('Error loading files:', err); - setError('Failed to load files. Please try again.'); - } finally { - setIsLoading(false); - } - }; - - loadMockFiles(); - }, []); - - // Handle file selection - const handleFileSelect = async (file) => { - if (file.type === 'directory') return; - - setSelectedFile(file); - setIsLoading(true); - setError(null); - - try { - // Simulate API delay - await new Promise(resolve => setTimeout(resolve, 400)); - - const content = MOCK_FILE_CONTENTS[file.id]; - if (content) { - setFileContent(content); - } else { - setFileContent(`// No content available for ${file.name}`); - } - } catch (err) { - console.error('Error fetching file content:', err); - setError('Failed to load file content. Please try again.'); - } finally { - setIsLoading(false); - } - }; - - return ( -
-
- - - - - Explorer - Search - - - - {isLoading && !files.length ? ( -
- -
- ) : error && !files.length ? ( - - - Error - {error} - - ) : ( - - )} -
- - -
- Search functionality will be implemented here -
-
-
-
- - - - - {selectedFile ? ( - - ) : ( -
- Select a file to view its content -
- )} -
-
-
-
- ); -}; - -export default CodeEditorLayout; \ No newline at end of file diff --git a/src/components/codeEditor/Editor.jsx b/src/components/codeEditor/Editor.jsx deleted file mode 100644 index 3b90a30..0000000 --- a/src/components/codeEditor/Editor.jsx +++ /dev/null @@ -1,152 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import Editor from '@monaco-editor/react'; -import { Loader2, AlertCircle } from 'lucide-react'; -import { Alert, AlertDescription, AlertTitle } from '../ui/alert'; - -const CodeEditor = ({ fileContent, fileName, isLoading, error }) => { - const [language, setLanguage] = useState('javascript'); - const [theme, setTheme] = useState('vs-dark'); - - // Determine language based on file extension - useEffect(() => { - if (!fileName) return; - - const extension = fileName.split('.').pop()?.toLowerCase(); - - switch(extension) { - case 'js': - setLanguage('javascript'); - break; - case 'jsx': - setLanguage('javascript'); - break; - case 'ts': - setLanguage('typescript'); - break; - case 'tsx': - setLanguage('typescript'); - break; - case 'html': - setLanguage('html'); - break; - case 'css': - setLanguage('css'); - break; - case 'scss': - setLanguage('scss'); - break; - case 'json': - setLanguage('json'); - break; - case 'md': - setLanguage('markdown'); - break; - case 'py': - setLanguage('python'); - break; - case 'go': - setLanguage('go'); - break; - case 'java': - setLanguage('java'); - break; - case 'php': - setLanguage('php'); - break; - case 'c': - setLanguage('c'); - break; - case 'cpp': - case 'cc': - setLanguage('cpp'); - break; - case 'rb': - setLanguage('ruby'); - break; - case 'rs': - setLanguage('rust'); - break; - case 'sh': - case 'bash': - setLanguage('shell'); - break; - case 'yml': - case 'yaml': - setLanguage('yaml'); - break; - default: - setLanguage('plaintext'); - } - }, [fileName]); - - // Handle editor options - const editorOptions = { - minimap: { enabled: true }, - scrollBeyondLastLine: false, - automaticLayout: true, - scrollbar: { - vertical: 'auto', - horizontal: 'auto', - }, - readOnly: true, // Set to false if you want to enable editing - fontSize: 14, - fontFamily: 'Menlo, Monaco, "Courier New", monospace', - lineNumbers: 'on', - wordWrap: 'on', - renderLineHighlight: 'all', - formatOnPaste: true, - tabSize: 2, - }; - - // Handle editor mounting - const handleEditorDidMount = (editor, monaco) => { - // You can add any additional configuration here - editor.focus(); - }; - - if (isLoading) { - return ( -
- -
- ); - } - - if (error) { - return ( -
- - - Error - {error} - -
- ); - } - - return ( -
-
- {fileName} -
-
- - -
- } - /> -
-
- ); -}; - -export default CodeEditor; \ No newline at end of file diff --git a/src/components/codeEditor/FileExplorer.jsx b/src/components/codeEditor/FileExplorer.jsx deleted file mode 100644 index 917d284..0000000 --- a/src/components/codeEditor/FileExplorer.jsx +++ /dev/null @@ -1,158 +0,0 @@ -import React, { useState } from 'react'; -import { cn } from '@/lib/utils'; -import { ScrollArea } from '../ui/scroll-area'; -import { ChevronDown, ChevronRight, File, Folder } from 'lucide-react'; - -const FileExplorer = ({ files, onSelectFile, selectedFile }) => { - // Transform flat file list into a tree structure - const buildFileTree = (fileList) => { - const root = { children: {} }; - - fileList.forEach(file => { - const pathParts = file.path.split('/').filter(Boolean); - let currentLevel = root; - - // Navigate through path parts to build tree - pathParts.forEach((part, index) => { - if (!currentLevel.children[part]) { - const isLastPart = index === pathParts.length - 1; - currentLevel.children[part] = { - ...file, - name: part, - children: {}, - isDirectory: !isLastPart || file.type === 'directory' - }; - } - currentLevel = currentLevel.children[part]; - }); - }); - - return root; - }; - - const fileTree = buildFileTree(files); - - return ( - -
- -
-
- ); -}; - -const FileTreeNode = ({ node, onSelectFile, selectedFile, level = 0, isRoot = false }) => { - const [expanded, setExpanded] = useState(true); - - // Skip rendering for root node - if (isRoot) { - return ( -
- {Object.values(node.children).map((childNode, index) => ( - - ))} -
- ); - } - - const hasChildren = Object.keys(node.children || {}).length > 0; - const isDirectory = node.isDirectory; - const isSelected = selectedFile && selectedFile.id === node.id; - - const handleClick = () => { - if (isDirectory) { - setExpanded(!expanded); - } else { - onSelectFile(node); - } - }; - - const getFileIcon = () => { - if (isDirectory) { - return expanded ? : ; - } - - // Determine file icon based on extension - const extension = node.name.split('.').pop()?.toLowerCase(); - - switch(extension) { - case 'js': - case 'jsx': - return ; - case 'ts': - case 'tsx': - return ; - case 'css': - case 'scss': - return ; - case 'html': - return ; - case 'json': - return ; - case 'md': - return ; - default: - return ; - } - }; - - return ( -
-
{ - 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/ui/resizable.jsx b/src/components/ui/resizable.jsx deleted file mode 100644 index 9d12cf5..0000000 --- a/src/components/ui/resizable.jsx +++ /dev/null @@ -1,66 +0,0 @@ -import React from 'react'; -import { cn } from '@/lib/utils'; -import * as ResizablePrimitive from 'react-resizable-panels'; - -const ResizablePanelGroup = ({ - className, - ...props -}) => ( - -); - -const ResizablePanel = ({ - className, - ...props -}) => ( - -); - -const ResizableHandle = ({ - className, - ...props -}) => ( - div]:rotate-90", - className - )} - {...props} - > -
- - - - -
-
-); - -export { - ResizablePanelGroup, - ResizablePanel, - ResizableHandle -}; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 83ce03e..931bea3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -427,20 +427,6 @@ resolved "https://registry.npmjs.org/@mediapipe/tasks-vision/-/tasks-vision-0.10.17.tgz" integrity sha512-CZWV/q6TTe8ta61cZXjfnnHsfWIdFhms03M9T7Cnd5y2mdpylJM0rF1qRq+wsQVRMLz1OYPVEBU9ph2Bx8cxrg== -"@monaco-editor/loader@^1.5.0": - version "1.5.0" - resolved "https://registry.npmjs.org/@monaco-editor/loader/-/loader-1.5.0.tgz" - integrity sha512-hKoGSM+7aAc7eRTRjpqAZucPmoNOC4UUbknb/VNoTkEIkCPhqV8LfbsgM1webRM7S/z21eHEx9Fkwx8Z/C/+Xw== - dependencies: - state-local "^1.0.6" - -"@monaco-editor/react@^4.7.0": - version "4.7.0" - resolved "https://registry.npmjs.org/@monaco-editor/react/-/react-4.7.0.tgz" - integrity sha512-cyzXQCtO47ydzxpQtCGSQGOC8Gk3ZUeBXFAxD+CWXYFo5OqZyZUonFl0DwUlTyAfRHntBfw2p3w4s9R6oe1eCA== - dependencies: - "@monaco-editor/loader" "^1.5.0" - "@monogrid/gainmap-js@^3.0.6": version "3.1.0" resolved "https://registry.npmjs.org/@monogrid/gainmap-js/-/gainmap-js-3.1.0.tgz" @@ -3108,11 +3094,6 @@ mkdirp@^2.1.6: resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz" integrity sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A== -monaco-editor@^0.52.2, "monaco-editor@>= 0.25.0 < 1": - version "0.52.2" - resolved "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.52.2.tgz" - integrity sha512-GEQWEZmfkOGLdd3XK8ryrfWz3AIP8YymVXiPHEdewrUq7mh0qrKrfHLNCXcbB6sTnMLnOZ3ztSiKcciFUkIJwQ== - motion-dom@^11.18.1: version "11.18.1" resolved "https://registry.npmjs.org/motion-dom/-/motion-dom-11.18.1.tgz" @@ -3506,7 +3487,7 @@ react-composer@^5.0.3: dependencies: prop-types "^15.6.0" -"react-dom@^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom@^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc", "react-dom@^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom@^17.0.0 || ^18.0.0 || ^19.0.0", react-dom@^18, "react-dom@^18.0.0 || ^19.0.0", react-dom@^18.3.1, "react-dom@>= 15.0.0", react-dom@>=16.13, react-dom@>=16.6.0, react-dom@>=16.8, react-dom@>=16.8.0, "react-dom@>=18 <19": +"react-dom@^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom@^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom@^17.0.0 || ^18.0.0 || ^19.0.0", react-dom@^18, "react-dom@^18.0.0 || ^19.0.0", react-dom@^18.3.1, "react-dom@>= 15.0.0", react-dom@>=16.13, react-dom@>=16.6.0, react-dom@>=16.8, react-dom@>=16.8.0, "react-dom@>=18 <19": version "18.3.1" resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz" integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw== @@ -3577,11 +3558,6 @@ react-remove-scroll@2.6.0: use-callback-ref "^1.3.0" use-sidecar "^1.1.2" -react-resizable-panels@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/react-resizable-panels/-/react-resizable-panels-3.0.3.tgz" - integrity sha512-7HA8THVBHTzhDK4ON0tvlGXyMAJN1zBeRpuyyremSikgYh2ku6ltD7tsGQOcXx4NKPrZtYCm/5CBr+dkruTGQw== - react-router-dom@^6.28.0: version "6.28.0" resolved "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.28.0.tgz" @@ -3634,7 +3610,7 @@ react-use-measure@^2.1.7: resolved "https://registry.npmjs.org/react-use-measure/-/react-use-measure-2.1.7.tgz" integrity sha512-KrvcAo13I/60HpwGO5jpW7E9DfusKyLPLvuHlUyP5zqnmAPhNc6qTRjUQrdTADl0lpPpDVU2/Gg51UlOGHXbdg== -react@*, "react@^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", "react@^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react@^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc", "react@^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc", "react@^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react@^16.8.0 || ^17.0.0 || ^18.0.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc", "react@^16.x || ^17.x || ^18.x || ^19.0.0 || ^19.0.0-rc", "react@^17.0.0 || ^18.0.0 || ^19.0.0", react@^18, react@^18.0.0, "react@^18.0.0 || ^19.0.0", react@^18.3.1, "react@>= 15.0.0", "react@>= 16 || ^19.0.0-rc", "react@>= 16.8.0", react@>=16.13, react@>=16.6.0, react@>=16.8, react@>=16.8.0, react@>=17.0, "react@>=18 <19", react@>=18.0, react@>=18.0.0: +react@*, "react@^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", "react@^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react@^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc", "react@^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react@^16.8.0 || ^17.0.0 || ^18.0.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc", "react@^16.x || ^17.x || ^18.x || ^19.0.0 || ^19.0.0-rc", "react@^17.0.0 || ^18.0.0 || ^19.0.0", react@^18, react@^18.0.0, "react@^18.0.0 || ^19.0.0", react@^18.3.1, "react@>= 15.0.0", "react@>= 16 || ^19.0.0-rc", "react@>= 16.8.0", react@>=16.13, react@>=16.6.0, react@>=16.8, react@>=16.8.0, react@>=17.0, "react@>=18 <19", react@>=18.0, react@>=18.0.0: version "18.3.1" resolved "https://registry.npmjs.org/react/-/react-18.3.1.tgz" integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ== @@ -3949,11 +3925,6 @@ source-map@~0.6.1: resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -state-local@^1.0.6: - version "1.0.7" - resolved "https://registry.npmjs.org/state-local/-/state-local-1.0.7.tgz" - integrity sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w== - stats-gl@^2.2.8: version "2.4.2" resolved "https://registry.npmjs.org/stats-gl/-/stats-gl-2.4.2.tgz" From 0145ef816603374775606aba302095db836b2aa9 Mon Sep 17 00:00:00 2001 From: "$@#il" Date: Sun, 28 Sep 2025 02:05:46 +0530 Subject: [PATCH 3/3] Add 'Coming Soon' message to the landing page --- src/components/HeroSection.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/HeroSection.jsx b/src/components/HeroSection.jsx index 1122d02..f52eeac 100644 --- a/src/components/HeroSection.jsx +++ b/src/components/HeroSection.jsx @@ -146,6 +146,7 @@ const HeroSection = () => { /> FlareNet + Coming Soon - Services will be available shortly. Stay tuned!

Deploy your applications instantly with world-class performance, scalability, and security.