-
Notifications
You must be signed in to change notification settings - Fork 16
Updates React binding boilerplate code #391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3480157
Updates React binding boilerplate code
ZaidRehman 6b8da2e
6.2.8-beta.0
ZaidRehman bb69bb5
6.2.8-beta.1
ZaidRehman 8752c42
React bindings updated
ZaidRehman f2add35
6.2.8-beta.2
ZaidRehman 6f4d2f8
retrigger pipeline
ZaidRehman 117506a
test case fix for ubuntu
ZaidRehman 63f05aa
rebased with master
ZaidRehman 81029fe
7.0.1-beta.0
ZaidRehman d934589
version update
ZaidRehman 1a08ac9
7.0.1-beta.2
ZaidRehman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,38 @@ | ||
| /* General styles for the product grid */ | ||
| .product { | ||
| color: red; | ||
| border: 1px solid red | ||
| } | ||
| .container { | ||
| display: flex; | ||
| } | ||
| flex-direction: column; | ||
| align-items: center; | ||
| width: 300px; /* Adjust width as necessary */ | ||
| padding: 20px; | ||
| margin: 20px; | ||
| box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | ||
| border-radius: 10px; | ||
| background-color: #fff; | ||
| transition: transform 0.3s ease-in-out; | ||
| } | ||
|
|
||
| .product img { | ||
| width: 100%; /* Makes images responsive */ | ||
| height: auto; | ||
| border-radius: 5px; | ||
| margin-bottom: 10px; | ||
| } | ||
|
|
||
| .product h1 { | ||
| font-size: 18px; | ||
| color: #333; | ||
| margin: 10px 0; | ||
| } | ||
|
|
||
| .product h2 { | ||
| font-size: 14px; | ||
| color: #666; | ||
| margin-bottom: 10px; | ||
| } | ||
|
|
||
| /* Hover effect for product card */ | ||
| .product:hover { | ||
| transform: translateY(-5px); | ||
| box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,24 @@ | ||
| import fs from 'fs-extra'; | ||
| import { uninterceptedApiClient } from '../lib/api/ApiClient'; | ||
| export async function downloadFile(url: string, filePath: string) { | ||
|
|
||
| export async function downloadFile(url: string, filePath: string): Promise<void> { | ||
| // Ensure the file exists before attempting to write to it | ||
| fs.ensureFileSync(filePath); | ||
|
|
||
| // Create a writable stream to save the downloaded file | ||
| const writer = fs.createWriteStream(filePath); | ||
|
|
||
| // Fetch the file as a stream | ||
| const response = await uninterceptedApiClient.get(url, { | ||
| responseType: 'stream', | ||
| }); | ||
|
|
||
| // Pipe the data stream to the file writer | ||
| response.data.pipe(writer); | ||
|
|
||
| // Return a promise that resolves when the download is finished or rejects if an error occurs | ||
| return new Promise<void>((resolve, reject) => { | ||
| writer.on('finish', resolve); | ||
| writer.on('error', reject); | ||
| writer.on('finish', () => resolve()); // Ensure resolve is called without any arguments | ||
| writer.on('error', error => reject(error)); // Directly pass the error to the reject function | ||
| }); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.