LilyyyXD
RReactiflux
•Created by LilyyyXD on 4/14/2023 in #help-js
lxd – 15-40 Apr 14
Any hint how to convert this code to promise, only a little bit
7 replies
RReactiflux
•Created by LilyyyXD on 4/14/2023 in #help-js
lxd – 15-40 Apr 14
I want it to be
1
2
7 replies
RReactiflux
•Created by LilyyyXD on 4/14/2023 in #help-js
lxd – 15-40 Apr 14
var fs = require("fs");
var pdf2img = require('pdf-img-convert');
async function createImg() {
pdfArray = await pdf2img.convert("input/pdf2.pdf");
for (i = 0; i < pdfArray.length; i++) {
fs.writeFile("output/temp1.png", pdfArray[i], function (error) {
console.log("1");
if (error) {
console.error("Error: " + error);
}
}); //writeFile
} // for
}
// createImg();
async function f(){
await createImg();
console.log("2");
}
f();
output:
2
17 replies
RReactiflux
•Created by LilyyyXD on 3/27/2023 in #help-threads-react
✅ – ✅ – lxd – 14-50 Mar 27
Ahh the SVG was corrupt I believe when used inline in code , i tried a different SVG and it showed up
39 replies
RReactiflux
•Created by LilyyyXD on 3/27/2023 in #help-threads-react
✅ – ✅ – lxd – 14-50 Mar 27
39 replies
RReactiflux
•Created by LilyyyXD on 3/27/2023 in #help-threads-react
✅ – ✅ – lxd – 14-50 Mar 27
Another interesting observation, the svg is there in the markup in source but still not visible in the page
39 replies
RReactiflux
•Created by LilyyyXD on 3/27/2023 in #help-threads-react
✅ – ✅ – lxd – 14-50 Mar 27
I am planning to use only the cart icon in my app for now as its not a big project, do u recommend installing the library or I can go ahead with this 1 svg
39 replies
RReactiflux
•Created by LilyyyXD on 3/27/2023 in #help-threads-react
✅ – ✅ – lxd – 14-50 Mar 27
Let me try that out
39 replies
RReactiflux
•Created by LilyyyXD on 3/27/2023 in #help-threads-react
✅ – ✅ – lxd – 14-50 Mar 27
Oh I see
39 replies
RReactiflux
•Created by LilyyyXD on 3/27/2023 in #help-threads-react
✅ – ✅ – lxd – 14-50 Mar 27
I was wondering is there' any way I can use the svg code directly instead of saving the file and importing it?
39 replies
RReactiflux
•Created by LilyyyXD on 3/27/2023 in #help-threads-react
✅ – ✅ – lxd – 14-50 Mar 27
Yes I want to contain it inside and size will also be taken care of by <Button>
39 replies
RReactiflux
•Created by LilyyyXD on 3/27/2023 in #help-threads-react
✅ – ✅ – lxd – 14-50 Mar 27
39 replies
RReactiflux
•Created by LilyyyXD on 3/27/2023 in #help-threads-react
✅ – ✅ – lxd – 14-50 Mar 27
I will have to resize it and maintain separate css file for flex and other styles but this react-bootstrap component should take care of all of it as I am not maintaining any css file for the project and everything is on bootstrap/react-bootstrap
39 replies
RReactiflux
•Created by LilyyyXD on 3/27/2023 in #help-threads-react
✅ – ✅ – lxd – 14-50 Mar 27
Code with the component-
<Button>
<svg
xmlns="http://www.w3.org/2000/svg"
data-name="Layer 1"
viewBox="0 0 24 24"
id="cart"
>
<path d="M8.5,19A1.5,1.5,0,1,0,10,20.5,1.5,1.5,0,0,0,8.5,19ZM19,16H7a1,1,0,0,1,0-2h8.49121A3.0132,3.0132,0,0,0,18.376,11.82422L19.96143,6.2749A1.00009,1.00009,0,0,0,19,5H6.73907A3.00666,3.00666,0,0,0,3.92139,3H3A1,1,0,0,0,3,5h.92139a1.00459,1.00459,0,0,1,.96142.7251l.15552.54474.00024.00506L6.6792,12.01709A3.00006,3.00006,0,0,0,7,18H19a1,1,0,0,0,0-2ZM17.67432,7l-1.2212,4.27441A1.00458,1.00458,0,0,1,15.49121,12H8.75439l-.25494-.89221L7.32642,7ZM16.5,19A1.5,1.5,0,1,0,18,20.5,1.5,1.5,0,0,0,16.5,19Z"></path>
</svg>
</Button>
39 replies
RReactiflux
•Created by LilyyyXD on 3/27/2023 in #help-threads-react
✅ – ✅ – lxd – 14-50 Mar 27
39 replies
RReactiflux
•Created by LilyyyXD on 3/27/2023 in #help-threads-react
✅ – ✅ – lxd – 14-50 Mar 27
without the component
39 replies
RReactiflux
•Created by LilyyyXD on 3/27/2023 in #help-threads-react
✅ – ✅ – lxd – 14-50 Mar 27
39 replies