-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Lagt till prop-types i komponenter, lagt in buttons.jsx (reuseable komponent), lagt in adeditform.jsx, ändrat api.js för postBid och getBids till mockapi istället för sessionStorage, lagt in errorboundry.jsx och lagt in contextAPI.js. Uppdaterat index.jsx för errorboundary och context + ändrat app.jsx * Utökad felhantering REST apier. Uppdaterat api.js,contextAPI.js, proposalboard.jsx, proposalform.jsx, biform.jsx & viewbid.jsx * Fixat CSS så knapparna i header+footer ser bra ut på mobila enheter - widht, height och font-size * Lagt till kommentar i errorboundry.jsx som beskriver error boundry komponenten * Lagt till kommentar i button.jsx som beskriver reuseable komponenten. Tog även bort kommentar från errorboundry.jsx som var ej nödvändig. * Fixade bugg i viewbids och bidform, råkade skicka currentUserData.author istället för currentUser. Så satte fel användare i komponenten. Nu åtgärdat * Ändra om kommentartexten i button.jsx, konstigt formulerad. * La till kommentarer i api.js för förtydligande + uppdaterade adboard.jsx med Redigera istället för texten Edit. * Uppdatera texten i adeditform till Redigera annons istället för Edit ad * Uppdatera readme - tjänster * Uppdaterat faq.jsx med lite vanliga frågor och svar * Lagt in lite dummy knappar och profilbild i profile.jsx inför presentation * Uppdaterat viewbids.jsx med en Välj testare knapp när man är inloggad som företag. Förberedelse inför presentation. * Uppdaterade från class till className i viewbids och profile * Uppdaterade från class till className i viewbids och profile * Uppdaterat lite texter i adeditform, addelconfirm och viewbids * Uppdaterat README med förtydligande på hur man ladda ner/klonar projektet
- Loading branch information
Showing
23 changed files
with
880 additions
and
214 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React, { Component } from 'react'; | ||
|
||
export class Errorboundry extends Component { | ||
constructor(props) { | ||
super(props); | ||
|
||
this.state = { | ||
hasError: false, | ||
error: '', | ||
errorInfo: '', | ||
}; | ||
} | ||
|
||
static getDerivedStateFromError(error) { | ||
return { | ||
hasError: true, | ||
}; | ||
} | ||
componentDidCatch(error, info) { | ||
return { | ||
error: error, | ||
errorInfo: info, | ||
}; | ||
} | ||
render() { | ||
if (this.state.hasError) { | ||
return ( | ||
<div> | ||
<div className='error-boundry-container'> | ||
<h1 className='error-header'>Something went wrong</h1> | ||
<p className='error-message '>Error Message : {this.state.error}</p> | ||
<p className='error-info'> | ||
Error Information : {this.state.errorInfo} | ||
</p> | ||
</div> | ||
</div> | ||
); | ||
} | ||
return this.props.children; | ||
} | ||
} | ||
|
||
export default Errorboundry; |
This file contains 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 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 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import { useIndexContext } from '../context/contextAPI'; | ||
|
||
const Error = () => { | ||
const { error, setError } = useIndexContext(); | ||
|
||
return ( | ||
<div className='error-container'> | ||
<h1 className='error-header'>Something went wrong</h1> | ||
<p className='error-detail'>Error message : {error}</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Error; |
Oops, something went wrong.