diff --git a/.github/workflows/issue-create-automate-message.yml b/.github/workflows/issue-create-automate-message.yml index 3233a24..09e339d 100644 --- a/.github/workflows/issue-create-automate-message.yml +++ b/.github/workflows/issue-create-automate-message.yml @@ -15,12 +15,14 @@ jobs: uses: actions/github-script@v6 with: script: | - const issueNumber = context.issue.number; - const commentBody1 = `### Thank you for raising this issue!\n We'll review it as soon as possible. We truly appreciate your contributions! ✨\n\n> Meanwhile make sure you've visited the README.md, CONTRIBUTING.md, and CODE_OF_CONDUCT.md before creating a PR for this. Also, please do NOT create a PR until this issue has been assigned to you. 😊`; - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - body: commentBody1 - }); - console.log('Comment added successfully.'); + (async () => { + const issueNumber = context.issue.number; + const commentBody1 = `### Thank you for raising this issue!\n We'll review it as soon as possible. We truly appreciate your contributions! ✨\n\n> Meanwhile make sure you've visited the README.md, CONTRIBUTING.md, and CODE_OF_CONDUCT.md before creating a PR for this. Also, please do NOT create a PR until this issue has been assigned to you. 😊`; + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issueNumber, + body: commentBody1 + }); + console.log('Comment added successfully.'); + })(); \ No newline at end of file diff --git a/.github/workflows/pr-create-automate-message.yml b/.github/workflows/pr-create-automate-message.yml index fb93b41..4835628 100644 --- a/.github/workflows/pr-create-automate-message.yml +++ b/.github/workflows/pr-create-automate-message.yml @@ -16,12 +16,14 @@ jobs: uses: actions/github-script@v6 with: script: | - const prNumber = context.issue.number; - const commentBody = `### Thanks for creating a PR for your Issue! ☺️\n\nWe'll review it as soon as possible.\nIn the meantime, please double-check the **file changes** and ensure that **all commits** are accurate.\n\nIf there are any **unresolved review comments**, feel free to resolve them. πŸ™ŒπŸΌ`; - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: prNumber, - body: commentBody - }); - console.log('Comment added successfully.'); + (async () => { + const prNumber = context.issue.number; + const commentBody = `### Thanks for creating a PR for your Issue! ☺️\n\nWe'll review it as soon as possible.\nIn the meantime, please double-check the **file changes** and ensure that **all commits** are accurate.\n\nIf there are any **unresolved review comments**, feel free to resolve them. πŸ™ŒπŸΌ`; + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: prNumber, + body: commentBody + }); + console.log('Comment added successfully.'); + })(); \ No newline at end of file diff --git a/LocalMind-Frontend/src/shared/component/v1/LoginPage.tsx b/LocalMind-Frontend/src/shared/component/v1/LoginPage.tsx index d3189a7..4ac63bc 100644 --- a/LocalMind-Frontend/src/shared/component/v1/LoginPage.tsx +++ b/LocalMind-Frontend/src/shared/component/v1/LoginPage.tsx @@ -18,10 +18,9 @@ const LoginPage: React.FC = ({ apiService }) => { const [error, setError] = useState('') const navigate = useNavigate() - const handleLogin = async () => { - try { - setError('') - const response = await apiService.login(email, password) + const handleLogin = async () => { + try { + const response = await apiService.login(email, password) if (response.success) { navigate('/dashboard')