Skip to content
This repository was archived by the owner on Feb 9, 2024. It is now read-only.

Conversation

@ssozi91
Copy link

@ssozi91 ssozi91 commented Oct 9, 2017

worked up to number 5 so far

kiyaGu added a commit to kiyaGu/cyf-hotel-react that referenced this pull request Oct 12, 2017
kiyaGu added a commit to kiyaGu/cyf-hotel-react that referenced this pull request Oct 12, 2017
@ssozi91
Copy link
Author

ssozi91 commented Oct 12, 2017

got the days stayed row fixed

@@ -1,18 +1,62 @@
import React, { Component } from "react";
import Search from "../components/Search.js";
import ResultsTable from '../components/ResultsTable'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you use Windows? though this might work on your machine this file is named resultsTable.js and you import it with capital here. Best to always use capital in react projects

isClicked: true,
});
}
sortIt = (thing) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is thing?! need to name things better

sortIt = (thing) => {
console.log('thing:', thing)
const bookings = this.state.bookings
const sortedBookings = this.state.bookings.sort()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to filter by the particular header that is clicked, there is no single way to sort a data table

})
}
}
// selectedRows = (){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not good to push commented out code, delete them before pushing

};
}
search = () => {
console.info("to do!");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this still console info?

}
}

onClicked = () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onClick is not a good name for a function, I assume this is the search?

@@ -0,0 +1,10 @@
import React from 'react';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really a component, just a function. So you don't really need to import React here

@kkarimi kkarimi closed this Feb 26, 2018
Doris-Siu added a commit to Doris-Siu/hotel-booking-website that referenced this pull request Dec 5, 2022
AdrianIlovan added a commit to AdrianIlovan/cyf-hotel-react that referenced this pull request Jun 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants