├── .github └── workflows │ ├── codeql.yml │ └── sonarqube.yml ├── .gitignore ├── Hello.js ├── README.md ├── build ├── asset-manifest.json ├── index.html └── static │ ├── css │ ├── main.c4bcdd99.css │ └── main.c4bcdd99.css.map │ └── js │ ├── main.8e9dde19.js │ ├── main.8e9dde19.js.LICENSE.txt │ └── main.8e9dde19.js.map ├── package-lock.json ├── package.json ├── public └── index.html └── src ├── index.js └── style.css /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ "main" ] 17 | pull_request: 18 | branches: [ "main" ] 19 | schedule: 20 | - cron: '17 3 * * 6' 21 | 22 | jobs: 23 | analyze: 24 | name: Analyze 25 | # Runner size impacts CodeQL analysis time. To learn more, please see: 26 | # - https://gh.io/recommended-hardware-resources-for-running-codeql 27 | # - https://gh.io/supported-runners-and-hardware-resources 28 | # - https://gh.io/using-larger-runners 29 | # Consider using larger runners for possible analysis time improvements. 30 | runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} 31 | timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} 32 | permissions: 33 | # required for all workflows 34 | security-events: write 35 | 36 | # only required for workflows in private repositories 37 | actions: read 38 | contents: read 39 | 40 | strategy: 41 | fail-fast: false 42 | matrix: 43 | language: [ 'javascript-typescript' ] 44 | # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] 45 | # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both 46 | # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both 47 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support 48 | 49 | steps: 50 | - name: Checkout repository 51 | uses: actions/checkout@v4 52 | 53 | # Initializes the CodeQL tools for scanning. 54 | - name: Initialize CodeQL 55 | uses: github/codeql-action/init@v3 56 | with: 57 | languages: ${{ matrix.language }} 58 | # If you wish to specify custom queries, you can do so here or in a config file. 59 | # By default, queries listed here will override any specified in a config file. 60 | # Prefix the list here with "+" to use these queries and those in the config file. 61 | 62 | # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 63 | # queries: security-extended,security-and-quality 64 | 65 | 66 | # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). 67 | # If this step fails, then you should remove it and run the build manually (see below) 68 | - name: Autobuild 69 | uses: github/codeql-action/autobuild@v3 70 | 71 | # ℹ️ Command-line programs to run using the OS shell. 72 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun 73 | 74 | # If the Autobuild fails above, remove it and uncomment the following three lines. 75 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. 76 | 77 | # - run: | 78 | # echo "Run, Build Application using script" 79 | # ./location_of_script_within_repo/buildscript.sh 80 | 81 | - name: Perform CodeQL Analysis 82 | uses: github/codeql-action/analyze@v3 83 | with: 84 | category: "/language:${{matrix.language}}" 85 | -------------------------------------------------------------------------------- /.github/workflows/sonarqube.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | 6 | # This workflow helps you trigger a SonarQube analysis of your code and populates 7 | # GitHub Code Scanning alerts with the vulnerabilities found. 8 | # (this feature is available starting from SonarQube 9.7, Developer Edition and above) 9 | 10 | # 1. Make sure you add a valid GitHub configuration to your SonarQube (Administration > DevOps platforms > GitHub) 11 | 12 | # 2. Import your project on SonarQube 13 | # * Add your repository as a new project by clicking "Create project" from your homepage. 14 | # 15 | # 3. Select GitHub Actions as your CI and follow the tutorial 16 | # * a. Generate a new token and add it to your GitHub repository's secrets using the name SONAR_TOKEN 17 | # (On SonarQube, click on your avatar on top-right > My account > Security or ask your administrator) 18 | # 19 | # * b. Copy/paste your SonarQube host URL to your GitHub repository's secrets using the name SONAR_HOST_URL 20 | # 21 | # * c. Copy/paste the project Key into the args parameter below 22 | # (You'll find this information in SonarQube by following the tutorial or by clicking on Project Information at the top-right of your project's homepage) 23 | 24 | # Feel free to take a look at our documentation (https://docs.sonarqube.org/latest/analysis/github-integration/) 25 | # or reach out to our community forum if you need some help (https://community.sonarsource.com/c/sq/10) 26 | 27 | name: SonarQube analysis 28 | 29 | on: 30 | push: 31 | branches: [ "main" ] 32 | pull_request: 33 | branches: [ "main" ] 34 | workflow_dispatch: 35 | 36 | permissions: 37 | pull-requests: read # allows SonarQube to decorate PRs with analysis results 38 | 39 | jobs: 40 | Analysis: 41 | runs-on: ubuntu-latest 42 | 43 | steps: 44 | - name: Analyze with SonarQube 45 | 46 | # You can pin the exact commit or the version. 47 | # uses: SonarSource/sonarqube-scan-action@v1.1.0 48 | uses: SonarSource/sonarqube-scan-action@7295e71c9583053f5bf40e9d4068a0c974603ec8 49 | env: 50 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information 51 | SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on SonarQube, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) 52 | SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} # add the URL of your instance to the secrets of this repo with the name SONAR_HOST_URL (Settings > Secrets > Actions > add new repository secret) 53 | with: 54 | # Additional arguments for the sonarcloud scanner 55 | args: 56 | # Unique key of your project. You can find it in SonarQube > [my project] > Project Information (top-right menu) 57 | # mandatory 58 | -Dsonar.projectKey= 59 | # Comma-separated paths to directories containing main source files. 60 | #-Dsonar.sources= # optional, default is project base directory 61 | # When you need the analysis to take place in a directory other than the one from which it was launched 62 | #-Dsonar.projectBaseDir= # optional, default is . 63 | # Comma-separated paths to directories containing test source files. 64 | #-Dsonar.tests= # optional. For more info about Code Coverage, please refer to https://docs.sonarcloud.io/enriching/test-coverage/overview/ 65 | # Adds more detail to both client and server-side analysis logs, activating DEBUG mode for the scanner, and adding client-side environment variables and system properties to the server-side log of analysis report processing. 66 | #-Dsonar.verbose= # optional, default is false 67 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /Hello.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default ({ name }) =>

Hello {name}!

; 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React-Countdown-Timer 2 | 3 | Timer implementation with hooks 4 | 5 | https://github.com/Akki90skid/React-Hooks/assets/25727015/832764bc-15d4-4ed0-94d4-c7dec8d7cb5c 6 | 7 | Usage link- 8 | https://aaqibhafeezkhan.github.io/Timer-Countdown-using-React-Hooks/ 9 | -------------------------------------------------------------------------------- /build/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": { 3 | "main.css": "/Timer-Countdown-using-React-Hooks/static/css/main.c4bcdd99.css", 4 | "main.js": "/Timer-Countdown-using-React-Hooks/static/js/main.8e9dde19.js", 5 | "index.html": "/Timer-Countdown-using-React-Hooks/index.html", 6 | "main.c4bcdd99.css.map": "/Timer-Countdown-using-React-Hooks/static/css/main.c4bcdd99.css.map", 7 | "main.8e9dde19.js.map": "/Timer-Countdown-using-React-Hooks/static/js/main.8e9dde19.js.map" 8 | }, 9 | "entrypoints": [ 10 | "static/css/main.c4bcdd99.css", 11 | "static/js/main.8e9dde19.js" 12 | ] 13 | } -------------------------------------------------------------------------------- /build/index.html: -------------------------------------------------------------------------------- 1 | React App
-------------------------------------------------------------------------------- /build/static/css/main.c4bcdd99.css: -------------------------------------------------------------------------------- 1 | body{align-items:center;background-color:#ecf0f1;display:flex;font-family:Lato,sans-serif;height:100vh;justify-content:center;margin:0}.timer-container{text-align:center}.clock{animation:pulse 1.5s infinite alternate;color:#3498db;display:inline-block;font-size:3em}.timer{color:#e74c3c;font-size:1.5em;font-weight:700;margin-top:10px}button{background-color:#2ecc71;border:none;border-radius:5px;color:#fff;cursor:pointer;display:inline-block;font-size:1em;margin-top:20px;padding:15px 30px;text-decoration:none;transition:background-color .3s ease-in-out}button:hover{background-color:#27ae60}@keyframes pulse{to{color:#2980b9;transform:scale(1.1)}} 2 | /*# sourceMappingURL=main.c4bcdd99.css.map*/ -------------------------------------------------------------------------------- /build/static/css/main.c4bcdd99.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"static/css/main.c4bcdd99.css","mappings":"AAAA,KAII,kBAAmB,CAFnB,wBAAyB,CACzB,YAAa,CAFb,2BAA+B,CAK/B,YAAa,CADb,sBAAuB,CAEvB,QACF,CAEA,iBACE,iBACF,CAEA,OAIE,uCAAwC,CADxC,aAAc,CAFd,oBAAqB,CACrB,aAGF,CAEA,OAEE,aAAc,CADd,eAAgB,CAEhB,eAAiB,CACjB,eACF,CAEA,OAKE,wBAAyB,CAKzB,WAAY,CAJZ,iBAAkB,CAFlB,UAAW,CAKX,cAAe,CARf,oBAAqB,CAOrB,aAAc,CADd,eAAgB,CALhB,iBAAkB,CAClB,oBAAqB,CAQrB,2CACF,CAEA,aACE,wBACF,CAEA,iBACE,GAEE,aAAc,CADd,oBAEF,CACF","sources":["style.css"],"sourcesContent":["body {\r\n font-family: 'Lato', sans-serif;\r\n background-color: #ecf0f1;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 100vh;\r\n margin: 0;\r\n }\r\n \r\n .timer-container {\r\n text-align: center;\r\n }\r\n \r\n .clock {\r\n display: inline-block;\r\n font-size: 3em;\r\n color: #3498db;\r\n animation: pulse 1.5s infinite alternate;\r\n }\r\n \r\n .timer {\r\n font-size: 1.5em;\r\n color: #e74c3c;\r\n font-weight: bold;\r\n margin-top: 10px;\r\n }\r\n \r\n button {\r\n display: inline-block;\r\n padding: 15px 30px;\r\n text-decoration: none;\r\n color: #fff;\r\n background-color: #2ecc71;\r\n border-radius: 5px;\r\n margin-top: 20px;\r\n font-size: 1em;\r\n cursor: pointer;\r\n border: none;\r\n transition: background-color 0.3s ease-in-out;\r\n }\r\n \r\n button:hover {\r\n background-color: #27ae60;\r\n }\r\n \r\n @keyframes pulse {\r\n to {\r\n transform: scale(1.1);\r\n color: #2980b9;\r\n }\r\n }\r\n "],"names":[],"sourceRoot":""} -------------------------------------------------------------------------------- /build/static/js/main.8e9dde19.js: -------------------------------------------------------------------------------- 1 | /*! For license information please see main.8e9dde19.js.LICENSE.txt */ 2 | (()=>{"use strict";var e={123:e=>{var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(l){return!1}}()?Object.assign:function(e,l){for(var i,a,o=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u{var r=n(43),l=n(123),i=n(853);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n