From 8472733b852637af4bf163e48174ccc85e5c87ff Mon Sep 17 00:00:00 2001 From: shivajee98 Date: Fri, 8 Mar 2024 23:09:36 +0530 Subject: [PATCH 1/9] Defined create function outside the if block inside signupPage.tsx and resolved typos --- src/pages/signupPage.tsx | 66 +++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/src/pages/signupPage.tsx b/src/pages/signupPage.tsx index 50124d1..5968da3 100644 --- a/src/pages/signupPage.tsx +++ b/src/pages/signupPage.tsx @@ -60,7 +60,7 @@ const formSchema = z.object({ const SignUp = () => { const router = useRouter() const [loading, setLoading] = useState(true) - const suceesPath = process.env.NEXT_PUBLIC_SUCCESS_LOGIN_PATH + const successPath = process.env.NEXT_PUBLIC_SUCCESS_LOGIN_PATH const failurePath = process.env.NEXT_PUBLIC_FAILURE_LOGIN_PATH const [formData, setFormData] = useState({ @@ -78,48 +78,52 @@ const SignUp = () => { userId: userId || '', secret: secret || '', } - - if (userId && secret) { - const create = async ({ name, email, password }: any) => { - try { - const userData = await appwriteService.createUserAccount({ - name, - email, - password, - }) - await appwriteService.createDatabaseAccount({ name, email, password }) - await appwriteService.createVerification() - if (userData) { - setAuthStatus(true) - } - appwriteService - .verifyUser(verifyParams) - .then(() => { - console.log('user is verified') - router.push('/') - }) - .catch((err) => { - console.log(err) - setError(err.message) - }) - router.push('/') - } catch (error: any) { - console.log(error) - setError(error.message) + const create = async ({ name, email, password }: any) => { + try { + const userData = await appwriteService.createUserAccount({ + name, + email, + password, + }) + await appwriteService.createDatabaseAccount({ name, email, password }) + await appwriteService.createVerification() + if (userData) { + setAuthStatus(true) } + appwriteService + .verifyUser(verifyParams) + .then(() => { + console.log('user is verified') + router.push('/') + }) + .catch((err) => { + console.log(err) + setError(err.message) + }) + router.push('/') + } catch (error: any) { + console.log(error) + setError(error.message) } + } + if (userId && secret) { + create({ + name: formData.name, + email: formData.email, + password: formData.password, + }); } else { console.error('userId and/or secret not found or invalid.') } const googleAuth = async (e: any) => { e.preventDefault() - account.createOAuth2Session('google', suceesPath, failurePath) + account.createOAuth2Session('google', successPath, failurePath) router.push('/') } const githubAuth = async (e: any) => { e.preventDefault() - account.createOAuth2Session('github', suceesPath, failurePath) + account.createOAuth2Session('github', successPath, failurePath) router.push('/') } From 3decdc231219aed4acb5c02a399d62bc33e3db1c Mon Sep 17 00:00:00 2001 From: shivajee98 Date: Sat, 9 Mar 2024 01:59:40 +0530 Subject: [PATCH 2/9] Fix #58: Build Error: window is not defined during static generation --- src/pages/signupPage.tsx | 50 ++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/pages/signupPage.tsx b/src/pages/signupPage.tsx index 5968da3..9f0c858 100644 --- a/src/pages/signupPage.tsx +++ b/src/pages/signupPage.tsx @@ -71,13 +71,19 @@ const SignUp = () => { const [error, setError] = useState('') const { setAuthStatus } = useAuth() - const urlParams = new URLSearchParams(window.location.search) - const userId = urlParams.get('userId') - const secret = urlParams.get('secret') + let userId = '' + let secret = '' + if (typeof window !== 'undefined') { + const urlParams = new URLSearchParams(window.location.search) + userId = urlParams.get('userId') || '' + secret = urlParams.get('secret') || '' + } + const verifyParams = { userId: userId || '', secret: secret || '', } + const create = async ({ name, email, password }: any) => { try { const userData = await appwriteService.createUserAccount({ @@ -106,21 +112,27 @@ const SignUp = () => { setError(error.message) } } - if (userId && secret) { - create({ - name: formData.name, - email: formData.email, - password: formData.password, - }); - } else { - console.error('userId and/or secret not found or invalid.') - } + + useEffect(() => { + const checkAuth = async () => { + try { + setLoading(true) + const data = await appwriteService.isLoggedIn() + if (data) router.replace('/') + } catch (error) { + } finally { + setLoading(false) + } + } + checkAuth() + }, [router]) const googleAuth = async (e: any) => { e.preventDefault() account.createOAuth2Session('google', successPath, failurePath) router.push('/') } + const githubAuth = async (e: any) => { e.preventDefault() account.createOAuth2Session('github', successPath, failurePath) @@ -144,25 +156,13 @@ const SignUp = () => { }) } - useEffect(() => { - const checkAuth = async () => { - try { - setLoading(true) - const data = await appwriteService.isLoggedIn() - if (data) router.replace('/') - } catch (error) { - } finally { - setLoading(false) - } - } - checkAuth() - }, [router]) if (loading) return (
) + return ( <>
From dd42365a03215ae2f4b08b4ddfccd22608825d36 Mon Sep 17 00:00:00 2001 From: shivajee98 Date: Sat, 9 Mar 2024 02:41:56 +0530 Subject: [PATCH 3/9] Fixed typo in successPath --- src/pages/loginPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/loginPage.tsx b/src/pages/loginPage.tsx index d1dbf43..ce57f59 100644 --- a/src/pages/loginPage.tsx +++ b/src/pages/loginPage.tsx @@ -49,7 +49,7 @@ const formSchema = z.object({ const Login = () => { const [loading, setLoading] = useState(true) const router = useRouter() - const suceesPath = process.env.NEXT_PUBLIC_SUCCESS_LOGIN_PATH + const successPath = process.env.NEXT_PUBLIC_SUCCESS_LOGIN_PATH const failurePath = process.env.NEXT_PUBLIC_FAILURE_LOGIN_PATH const [error, setError] = useState('') const [formData, setFormData] = useState({ @@ -72,13 +72,13 @@ const Login = () => { } const googleAuth = async (e: any) => { e.preventDefault() - account.createOAuth2Session('google', suceesPath, failurePath) + account.createOAuth2Session('google', successPath, failurePath) router.push('/') } const githubAuth = async (e: any) => { e.preventDefault() - account.createOAuth2Session('github', suceesPath, failurePath) + account.createOAuth2Session('github', successPath, failurePath) router.push('/') } From 5be73682d22eeff90fbcfb4e767d22e1cad7556e Mon Sep 17 00:00:00 2001 From: shivajee98 Date: Sat, 9 Mar 2024 02:54:21 +0530 Subject: [PATCH 4/9] Fixed typo in compute.ts Lamda to Lambda --- src/store/aws/compute.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/aws/compute.ts b/src/store/aws/compute.ts index 739c921..dd8566f 100644 --- a/src/store/aws/compute.ts +++ b/src/store/aws/compute.ts @@ -47,7 +47,7 @@ const compute = { icon: AWSIcons.ImageBuilderIcon, }, { - title: 'Lamda', + title: 'Lambda', icon: AWSIcons.LambdaIcon, }, { From 09c81115e77f2cba41a922f28e7d3e4210cf6f2a Mon Sep 17 00:00:00 2001 From: Arya Soni Date: Sun, 10 Mar 2024 17:30:06 +0530 Subject: [PATCH 5/9] Bug Fix --- .github/ISSUE_TEMPLATE/figma-design.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/figma-design.yaml b/.github/ISSUE_TEMPLATE/figma-design.yaml index 952041d..4f75b31 100644 --- a/.github/ISSUE_TEMPLATE/figma-design.yaml +++ b/.github/ISSUE_TEMPLATE/figma-design.yaml @@ -1,18 +1,18 @@ name: Figma Design Submission description: Submit a design file for review -title: "[Design]: " +title: '[Design]: ' labels: [design, figma, infraboard, xerocodee] body: - type: markdown attributes: - value: "Thank you for submitting your design. Please provide the necessary details for review." + value: 'Thank you for submitting your design. Please provide the necessary details for review.' - type: input id: design-title attributes: label: Design Title - description: "What is the title of your design?" - placeholder: "Enter the title here" + description: 'What is the title of your design?' + placeholder: 'Enter the title here' validations: required: true @@ -20,8 +20,8 @@ body: id: design-description attributes: label: Design Description - description: "Please provide a detailed description of your design." - placeholder: "Describe your design here" + description: 'Please provide a detailed description of your design.' + placeholder: 'Describe your design here' validations: required: true @@ -29,8 +29,8 @@ body: id: figma-link attributes: label: Figma File Link - description: "Please paste the link to your Figma file." - placeholder: "https://www.figma.com/file/..." + description: 'Please paste the link to your Figma file.' + placeholder: 'https://www.figma.com/file/...' validations: required: true @@ -38,19 +38,19 @@ body: id: terms attributes: label: Terms and Conditions - description: "Please accept the terms and conditions." + description: 'Please accept the terms and conditions.' options: - - label: "I have read and agree to the [Terms of Service](/terms) and [Privacy Policy](/privacy)." + - label: 'I have read and agree to the [Terms of Service](/terms) and [Privacy Policy](/privacy).' - type: dropdown id: design-category attributes: label: Design Category - description: "Please select the category your design best fits into." + description: 'Please select the category your design best fits into.' options: - UI/UX - Branding - Icons - Illustrations validations: - required: true \ No newline at end of file + required: true From 2fa79fb9b2d894bd1d9958609165cfe9e327fbfb Mon Sep 17 00:00:00 2001 From: Arya Soni Date: Mon, 11 Mar 2024 00:12:03 +0530 Subject: [PATCH 6/9] Remove prettier --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 12f83ea..584733b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,9 +20,7 @@ jobs: with: node-version: 18 - run: npm install - - run: npx prettier --check . - - run: npx prettier --write . - + build: runs-on: ubuntu-latest needs: lint From d71931b3c8abc50523fa486e4193c130ca32ecdc Mon Sep 17 00:00:00 2001 From: Abhishek Jha Date: Mon, 11 Mar 2024 18:49:59 +0530 Subject: [PATCH 7/9] Adding Icons model for GCP --- src/assets/gcp/compute/AppEngine.tsx | 53 +++++++ src/assets/gcp/compute/CloudGPU.tsx | 31 +++++ src/assets/gcp/compute/CloudTPU.tsx | 154 +++++++++++++++++++++ src/assets/gcp/compute/ComputeEngine.tsx | 78 +++++++++++ src/assets/gcp/compute/ContainerEngine.tsx | 50 +++++++ src/assets/gcp/index.ts | 34 +++++ src/assets/gcp/network/CloudCDN.tsx | 84 +++++++++++ src/assets/gcp/network/CloudDNS.tsx | 52 +++++++ src/assets/gcp/network/CloudNetwork.tsx | 47 +++++++ src/assets/gcp/tools/Debugger.tsx | 108 +++++++++++++++ 10 files changed, 691 insertions(+) create mode 100644 src/assets/gcp/compute/AppEngine.tsx create mode 100644 src/assets/gcp/compute/CloudGPU.tsx create mode 100644 src/assets/gcp/compute/CloudTPU.tsx create mode 100644 src/assets/gcp/compute/ComputeEngine.tsx create mode 100644 src/assets/gcp/compute/ContainerEngine.tsx create mode 100644 src/assets/gcp/index.ts create mode 100644 src/assets/gcp/network/CloudCDN.tsx create mode 100644 src/assets/gcp/network/CloudDNS.tsx create mode 100644 src/assets/gcp/network/CloudNetwork.tsx create mode 100644 src/assets/gcp/tools/Debugger.tsx diff --git a/src/assets/gcp/compute/AppEngine.tsx b/src/assets/gcp/compute/AppEngine.tsx new file mode 100644 index 0000000..230e8fa --- /dev/null +++ b/src/assets/gcp/compute/AppEngine.tsx @@ -0,0 +1,53 @@ +import { IconInterface } from '@/assets/iconInterface' +import React from 'react' + +function AppEngine({ className}: IconInterface){ + return( + + + + + {"Icon_24px_AppEngine_Color"} + + + + + + + + + + + + ) +} + +export default React.memo(AppEngine) \ No newline at end of file diff --git a/src/assets/gcp/compute/CloudGPU.tsx b/src/assets/gcp/compute/CloudGPU.tsx new file mode 100644 index 0000000..efa2485 --- /dev/null +++ b/src/assets/gcp/compute/CloudGPU.tsx @@ -0,0 +1,31 @@ +import { IconInterface } from '@/assets/iconInterface' +import React from 'react' + +function CloudGPU({ className }: IconInterface){ + return( + + + + + {"Icon_24px_GPU_Color"} + + + + + + ) +} + +export default React.memo(CloudGPU) \ No newline at end of file diff --git a/src/assets/gcp/compute/CloudTPU.tsx b/src/assets/gcp/compute/CloudTPU.tsx new file mode 100644 index 0000000..cd2dfdc --- /dev/null +++ b/src/assets/gcp/compute/CloudTPU.tsx @@ -0,0 +1,154 @@ +import { IconInterface } from '@/assets/iconInterface' +import React from 'react' + +function CloudTPU({ className }: IconInterface) { + return ( + + + + + {'Icon_24px_TPU_Color'} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) +} + +export default React.memo(CloudTPU) \ No newline at end of file diff --git a/src/assets/gcp/compute/ComputeEngine.tsx b/src/assets/gcp/compute/ComputeEngine.tsx new file mode 100644 index 0000000..66cbed9 --- /dev/null +++ b/src/assets/gcp/compute/ComputeEngine.tsx @@ -0,0 +1,78 @@ +import { IconInterface } from '@/assets/iconInterface' +import React from 'react' + +function ComputeEngine({ className }: IconInterface) { + return ( + + Icon_24px_ComputeEngine_Color + + + + + + + + + + + + + + + + + + + + ) +} + +export default React.memo(ComputeEngine) \ No newline at end of file diff --git a/src/assets/gcp/compute/ContainerEngine.tsx b/src/assets/gcp/compute/ContainerEngine.tsx new file mode 100644 index 0000000..585f059 --- /dev/null +++ b/src/assets/gcp/compute/ContainerEngine.tsx @@ -0,0 +1,50 @@ +import { IconInterface } from '@/assets/iconInterface' +import React from 'react' + +function ContainerEngine({ className}: IconInterface){ + return( + + + + + + + + + + + + + + + + ) +} + +export default React.memo(ContainerEngine) \ No newline at end of file diff --git a/src/assets/gcp/index.ts b/src/assets/gcp/index.ts new file mode 100644 index 0000000..a9a69d0 --- /dev/null +++ b/src/assets/gcp/index.ts @@ -0,0 +1,34 @@ +//compute +import ComputeEngine from "./compute/ComputeEngine" +import AppEngine from "./compute/AppEngine" +import ContainerEngine from "./compute/ContainerEngine" +import CloudGPU from "./compute/CloudGPU" +import CloudTPU from "./compute/CloudTPU" + +//networking +import CloudCDN from "./network/CloudCDN" +import CloudDNS from "./network/CloudDNS" +import CloudNetwork from "./network/CloudNetwork" + +//tools +import Debugger from "./tools/Debugger" + + +const GCPIcons = { + //compute + ComputeEngine, + AppEngine, + ContainerEngine, + CloudGPU, + CloudTPU, + + //networking + CloudCDN, + CloudDNS, + CloudNetwork, + + //tools + Debugger +} + +export { GCPIcons } \ No newline at end of file diff --git a/src/assets/gcp/network/CloudCDN.tsx b/src/assets/gcp/network/CloudCDN.tsx new file mode 100644 index 0000000..0415069 --- /dev/null +++ b/src/assets/gcp/network/CloudCDN.tsx @@ -0,0 +1,84 @@ +import { IconInterface } from '@/assets/iconInterface' +import React from 'react' + +function CloudCDN({ className }: IconInterface){ + return ( + + + + + {"Icon_24px_CDN_Color"} + + + + + + + + + + + + + + + + + + ) +} + +export default React.memo(CloudCDN) \ No newline at end of file diff --git a/src/assets/gcp/network/CloudDNS.tsx b/src/assets/gcp/network/CloudDNS.tsx new file mode 100644 index 0000000..0bddfca --- /dev/null +++ b/src/assets/gcp/network/CloudDNS.tsx @@ -0,0 +1,52 @@ +import { IconInterface } from '@/assets/iconInterface' +import React from 'react' + +function CloudDNS({ className }: IconInterface){ + return( + + + + + {"Icon_24px_DNS_Color"} + + + + + + + + + + + + + + + + + ) +} + +export default React.memo(CloudDNS) \ No newline at end of file diff --git a/src/assets/gcp/network/CloudNetwork.tsx b/src/assets/gcp/network/CloudNetwork.tsx new file mode 100644 index 0000000..1642de5 --- /dev/null +++ b/src/assets/gcp/network/CloudNetwork.tsx @@ -0,0 +1,47 @@ +import { IconInterface } from '@/assets/iconInterface' +import React from 'react' + +function CloudNetwork({ className }: IconInterface) { + return ( + + + + + {'Icon_24px_Network_Color'} + + + + + + + + + + + + + + + ) +} + +export default React.memo(CloudNetwork) diff --git a/src/assets/gcp/tools/Debugger.tsx b/src/assets/gcp/tools/Debugger.tsx new file mode 100644 index 0000000..ec26052 --- /dev/null +++ b/src/assets/gcp/tools/Debugger.tsx @@ -0,0 +1,108 @@ +import { IconInterface } from '@/assets/iconInterface' +import React from 'react' + + +function Debugger({ className }: IconInterface){ + return( + + + + + + + + + + + + + + + + + + + + + ) +} + +export default React.memo(Debugger) \ No newline at end of file From b17ff7924c248460b098be2829beb6998456ac7b Mon Sep 17 00:00:00 2001 From: Arya Soni Date: Mon, 11 Mar 2024 21:38:22 +0530 Subject: [PATCH 8/9] Update .github --- .github/ISSUE_TEMPLATE/bug-report.yaml | 2 -- .github/workflows/build.yml | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yaml b/.github/ISSUE_TEMPLATE/bug-report.yaml index 64ac0cb..73bd0a7 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/bug-report.yaml @@ -50,8 +50,6 @@ body: attributes: label: Version options: - - Cloud - - Self-hosted - Local validations: required: true diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 584733b..b06241d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,9 +8,6 @@ permissions: checks: write pull-requests: write -env: - VITE_INTERNAL: true - jobs: lint: runs-on: ubuntu-latest @@ -20,7 +17,7 @@ jobs: with: node-version: 18 - run: npm install - + build: runs-on: ubuntu-latest needs: lint From 6dbdd80ebb7d27308bf5da588a752191a786a153 Mon Sep 17 00:00:00 2001 From: Abhishek Jha Date: Sat, 16 Mar 2024 20:18:50 +0530 Subject: [PATCH 9/9] adding tools icons GCP --- src/assets/gcp/index.ts | 9 ++++- src/assets/gcp/tools/Logging.tsx | 60 +++++++++++++++++++++++++++++ src/assets/gcp/tools/Monitoring.tsx | 40 +++++++++++++++++++ src/assets/gcp/tools/Trace.tsx | 53 +++++++++++++++++++++++++ 4 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 src/assets/gcp/tools/Logging.tsx create mode 100644 src/assets/gcp/tools/Monitoring.tsx create mode 100644 src/assets/gcp/tools/Trace.tsx diff --git a/src/assets/gcp/index.ts b/src/assets/gcp/index.ts index a9a69d0..48cd216 100644 --- a/src/assets/gcp/index.ts +++ b/src/assets/gcp/index.ts @@ -12,6 +12,9 @@ import CloudNetwork from "./network/CloudNetwork" //tools import Debugger from "./tools/Debugger" +import Monitoring from "./tools/Monitoring" +import Trace from "./tools/Trace" +import Logging from "./tools/Logging" const GCPIcons = { @@ -28,7 +31,11 @@ const GCPIcons = { CloudNetwork, //tools - Debugger + Debugger, + Monitoring, + Trace, + Logging + } export { GCPIcons } \ No newline at end of file diff --git a/src/assets/gcp/tools/Logging.tsx b/src/assets/gcp/tools/Logging.tsx new file mode 100644 index 0000000..1f07cb0 --- /dev/null +++ b/src/assets/gcp/tools/Logging.tsx @@ -0,0 +1,60 @@ +import { IconInterface } from '@/assets/iconInterface' +import React from 'react' + +function Logging({ className }: IconInterface) { + return ( + + + + + {'Icon_24px_Logging_Color'} + + + + + + + + + + + + + + + + ) +} +export default React.memo(Logging) \ No newline at end of file diff --git a/src/assets/gcp/tools/Monitoring.tsx b/src/assets/gcp/tools/Monitoring.tsx new file mode 100644 index 0000000..011ff35 --- /dev/null +++ b/src/assets/gcp/tools/Monitoring.tsx @@ -0,0 +1,40 @@ +import { IconInterface } from '@/assets/iconInterface' +import React from 'react' + +function Monitoring({ className }: IconInterface) { + return( + + + + + {"Icon_24px_Monitoring_Color"} + + + + + + + + ) +} + +export default React.memo(Monitoring) \ No newline at end of file diff --git a/src/assets/gcp/tools/Trace.tsx b/src/assets/gcp/tools/Trace.tsx new file mode 100644 index 0000000..fbb9c8a --- /dev/null +++ b/src/assets/gcp/tools/Trace.tsx @@ -0,0 +1,53 @@ +import { IconInterface } from '@/assets/iconInterface' +import React from 'react' + +function Trace({ className}: IconInterface){ + return( + + + + + {"Icon_24px_Trace_Color"} + + + + + + + + + + + + + + + + + + ) +} + +export default React.memo(Trace) \ No newline at end of file