{"id":20401205,"url":"https://github.com/sohanemon/diagnostic-center-client","last_synced_at":"2026-04-20T07:04:14.925Z","repository":{"id":151083407,"uuid":"565457467","full_name":"sohanemon/diagnostic-center-client","owner":"sohanemon","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-13T13:35:25.000Z","size":349,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T01:42:12.559Z","etag":null,"topics":["practice","swiper"],"latest_commit_sha":null,"homepage":"https://shapla-diagnostic-center.web.app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sohanemon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-13T13:29:59.000Z","updated_at":"2023-06-16T06:01:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"403b7e6d-67e4-4155-99be-a9436479a036","html_url":"https://github.com/sohanemon/diagnostic-center-client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sohanemon/diagnostic-center-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sohanemon%2Fdiagnostic-center-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sohanemon%2Fdiagnostic-center-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sohanemon%2Fdiagnostic-center-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sohanemon%2Fdiagnostic-center-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sohanemon","download_url":"https://codeload.github.com/sohanemon/diagnostic-center-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sohanemon%2Fdiagnostic-center-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32036803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["practice","swiper"],"created_at":"2024-11-15T04:48:34.433Z","updated_at":"2026-04-20T07:04:14.899Z","avatar_url":"https://github.com/sohanemon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Get data from Form\n\n```js\nconst data = [\"name\", \"photoURL\", \"email\", \"password\"].map(\n  (el) =\u003e e.target[el].value\n); //['sfj','sfa','sfa','dfa']\n```\n\nor a better way\n\n```js\nlet data = {}; // its important\n[\"email\", \"password\"].forEach((el) =\u003e (data[el] = e.target[el].value)); // {email: 'efj', password: 'sse'}\n```\n\n## To align something with margin (mx-auto, ml-auto, mr-auto)\n\n- set them as block element\n\n```js\n      \u003cButton className='bg-blue-900 ml-auto block' type='submit'\u003e\n```\n\n## Promise based toast/react-hot-toast\n\n- syntax\n\n```js\ntoast.promise(promise, {\n  /*configs*/\n});\n```\n\n- example\n\n```js\nconst promise = client.post(\"/service\", data);\ntoast.promise(promise, {\n  loading: \"loading\",\n  success: \"added successfully\",\n  error: \"something went wrong\",\n});\n```\n\n- and also further `.then` can be added\n\n```js\ntoast\n  .promise(client.post(\"/service\", data), {\n    // ...\n  })\n  .then(() =\u003e {\n    e.target.reset();\n    navigate(\"/\");\n  });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsohanemon%2Fdiagnostic-center-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsohanemon%2Fdiagnostic-center-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsohanemon%2Fdiagnostic-center-client/lists"}