Question
my function header is trying to call a image that i have on my machine? Do I have any error in this code? how can I know if it's right. if it's wrong provide example with code please

acubed - Microsoft Visual Studio Tools Edat View Team Window Help - Select Startup item... - Pa 11. App.test.js index.js App.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

YES, THERE WILL BE ERROR WHILE COMPILING DUE TO FOLLOWING REASON:-

1) URL IN THE SOURCE SHOULD BE IN DOUBLE QUOTES

2) USE MUST USE ' / ' INSTEAD OF ' \ '

i.e

your code isfunction Header() { return <img src={C:\Users\unknown\Desktop\Git\acubed\public\images\A-cubed.png} alt=a-cubed/> w

It should be,

function Header() { return <img src={C:/Users/unknown/Desktop/Git/acubed/public/images/A-cubed.png} alt=a-cubed/> }

3) NOT ALLOWED TO LOAD LOCAL RESOURCES

EVENTHOUGH IF YOU RUN THIS CODE YOU MAY SEE NO ERROR WHILE RUNNING THE REACT APP BUT YOU CANNOT SEE THE IMAGE. SINCE REACT APP RUN AS A SERVER AND DOES NOT HAVE ANY ACCESS TO YOUR C: DRIVE, THE BROWSER'S ERROR LOG RETURN ERROR STATING "Not allowed to load local resources". THIS ERROR WON'T AFFECT ANY FUNCTIONALITY OF PROGRAM BUT IT DOES NOT HAVE ACCESS TO VIEW. THE FUNCTION WILL RETURN IMAGE TAG AND SHOWS THE ALT TEXT "A-cubed" INDICATING THE IMAGE IS NOT REACHABLE.

IN ORDER TO SEE THE IMAGE, CREATE A IMAGE FOLDER IN YOUR REACT APP AND PLACE THE IMAGE IN THAT FOLDER AND SPECIFY THE URL IN THE IMAGE TAG SOURCE.

Add a comment
Know the answer?
Add Answer to:
my function header is trying to call a image that i have on my machine? Do...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Currently, my image size is 960 x 515 How do I make it so my header...

    Currently, my image size is 960 x 515 How do I make it so my header image covers the whole width of my page? The code for it is above skistowe Home Add a Skier Add a Trail! Tables 9 header{ background-repeat: no-repeat; max-width: 85%; padding: 145px; background-image: url("../Images/gondala2.jpg"); #site-header { margin-bottom: 1em; min-width: min-content; text-align: center; flex-shrink: 0; #site-h1 { font-family: Optima; font-size: 4em; letter-spacing: 7px; padding-bottom: 0.2em; padding-top: 65px;

  • JAVA Hello I am trying to add a menu to my Java code if someone can...

    JAVA Hello I am trying to add a menu to my Java code if someone can help me I would really appreacite it thank you. I found a java menu code but I dont know how to incorporate it to my code this is the java menu code that i found. import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.ButtonGroup; import javax.swing.JCheckBoxMenuItem; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JRadioButtonMenuItem; public class MenuExp extends JFrame { public MenuExp() { setTitle("Menu Example");...

  • I'm trying to use the odeint function or the quad function to integrate my integrand in my calc_H...

    I'm trying to use the odeint function or the quad function to integrate my integrand in my calc_Hmatrix function. however I am not sure what my y0 or my t would need to be in order to get the code to run properly. please help, if more information is needed I can update this post Project1(1) (1) (1) x S ㄨ scipyintegrate.odeint--Sc | + jupyter Project1(1) ()(1r File Edit View Insert Cell Kernel Widgets Help +x4r,수+H.CCode Trusted Python 3 O...

  • The source code I have is what I'm trying to fix for the assignment at the...

    The source code I have is what I'm trying to fix for the assignment at the bottom. Source code: //Group 1 - Jodie Butterworth, Brandon Kidd, Matt Heckler //11-21-19 //CSC 201 // Exercise to practice the basic manipulations of a linked list // Note: Uses nullptr, so need to make sure your compiler is set to use C++11 // In Code::Blocks this is under Settings==>Compiler #include <iostream> using namespace std; // Structure to contain data for a node (Could be...

  • I get how to do parts 2 and 3 using the numbercdf function on my ti84 which ill have for my test,...

    i get how to do parts 2 and 3 using the numbercdf function on my ti84 which ill have for my test, but part a is kinda kicking by but. i assume there is a base function/forumla to start with when solving for the density function? the solution i copied from my professor is but clearly this is incomplete or i copied it wrong. 5. Let X denote the time in hours needed to locate and correct a problem in...

  • the is my HTML and CSS code. I didn't attach the image or the CSS file...

    the is my HTML and CSS code. I didn't attach the image or the CSS file because of the space limit. two things I wanted to incorporate on this page are to make "MY TOP 3 MUSIC GENRES" blink using javascript and to make the video links autoplay using javascript both should be using javascript requirement: our professor told us not to use <div> or alert. thank you for your help <!DOCTYPE html> <!-- I used w3school for the formatting...

  • I need help in Python. This is a two step problem So I have the code...

    I need help in Python. This is a two step problem So I have the code down, but I am missing some requirements that I am stuck on. Also, I need help verifying the problem is correct.:) 7. Random Number File Writer Write a program that writes a series of random numbers to a file. Each random number should be in the range of 1 through 500. The application should let the user specify how many random numbers the file...

  • from PIL import Image import random # NOTE: Feel free to add in any constant values...

    from PIL import Image import random # NOTE: Feel free to add in any constant values you find useful to use BLACK = (0, 0, 0) WHITE = (255, 255, 255) # NOTE: Feel free to add in any helper functions to organize your code but # do NOT rename any existing functions (or else, autograder # won't be able to find them!!) # NOTE: The following function is already completed for you as an example # You can use...

  • For my computer class I have to create a program that deals with making and searching...

    For my computer class I have to create a program that deals with making and searching tweets. I am done with the program but keep getting the error below when I try the first option in the shell. Can someone please explain this error and show me how to fix it in my code below? Thanks! twitter.py - C:/Users/Owner/AppData/Local/Programs/Python/Python38/twitter.py (3.8.3) File Edit Format Run Options Window Help import pickle as pk from Tweet import Tweet import os def show menu():...

  • I beleiebve my code is right but it will not accept it. Please tell me what...

    I beleiebve my code is right but it will not accept it. Please tell me what I am doing wrong. Enter your name and the date in the comment section of each file: gp_cover.html, gp_page1.html, gp_page2.html, gp_page3.html, gp_layout.css, and gp_print.css respectively. Go to the gp_cover.html file and add a viewport meta tag to the document head, setting the width of the layout viewport to the device width and setting the initial scale of the viewport to 1.0. Go to the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT