diff --git a/techforgood/build/asset-manifest.json b/techforgood/build/asset-manifest.json index 9c2d4c7..82c9cec 100644 --- a/techforgood/build/asset-manifest.json +++ b/techforgood/build/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { "main.css": "/static/css/main.94d3a9b7.css", - "main.js": "/static/js/main.8d564318.js", + "main.js": "/static/js/main.c4fc4305.js", "index.html": "/index.html", "main.94d3a9b7.css.map": "/static/css/main.94d3a9b7.css.map", - "main.8d564318.js.map": "/static/js/main.8d564318.js.map" + "main.c4fc4305.js.map": "/static/js/main.c4fc4305.js.map" }, "entrypoints": [ "static/css/main.94d3a9b7.css", - "static/js/main.8d564318.js" + "static/js/main.c4fc4305.js" ] } \ No newline at end of file diff --git a/techforgood/build/index.html b/techforgood/build/index.html index 97bc208..5f34c7a 100644 --- a/techforgood/build/index.html +++ b/techforgood/build/index.html @@ -1 +1 @@ -
+ {successMessage} +
+ )}| Title | Description | +Keywords | Date Created | Actions |
|---|---|---|---|---|
| {request.title} | -{request.description} | -{new Date(request.created).toLocaleDateString()} | -- - {/* onClick={() => handleEdit(request.id)} */} - - | -|
| {request.title} | ++ {request.description.length > 100 ? ( + handleEdit(request)} + > + {request.description.substring(0, 100)}... + + ) : ( + request.description + )} + | +{request.keywords ? request.keywords.join(', ') : 'N/A'} | +{new Date(request.created).toLocaleDateString()} | ++ + + | +
No results found
) : ( <> - {currentResults.map((result, index) => ( -{result.description.split(/\s/).map((word, idx) => {
- if (submittedQueryArr.includes(word.replace(/\W/, "").toLowerCase())){
- return
Submitted on: {new Date(result.created).toLocaleDateString()}
- {result.keywords ? ( -Keywords: {result.keywords.map((words, idx) => { - const words_split = words.split(/\s/) - const pieces = [] - for (const word of words_split){ +
| Title | +Description | +Keywords | +Date Created | +Actions | +
|---|---|---|---|---|
| {result.title.split(/\s/).map((word, idx) => {
if (submittedQueryArr.includes(word.replace(/\W/, "").toLowerCase())){
- pieces.push( |
+ {result.description.split(/\s/).map((word, idx) => {
+ if (submittedQueryArr.includes(word.replace(/\W/, "").toLowerCase())){
+ return |
+ {result.keywords ? (
+ Keywords: {result.keywords.map((words, idx) => {
+ const words_split = words.split(/\s/)
+ const pieces = []
+ for (const word of words_split){
+ if (submittedQueryArr.includes(word.replace(/\W/, "").toLowerCase())){
+ pieces.push( |
+ ) : (
+ <>>
+ )}
+ Submitted on: {new Date(result.created).toLocaleDateString()} | ++ + | +
Page {currentPage}
{currentPage > 1 && } @@ -110,4 +125,33 @@ function SearchRequests() { ); } +const styles = { + requestTable: { + collumns: '10', + borderTop: '1px solid black', + borderBottom: '1px solid black', + margin: '0 auto', + width: '60%', + borderCollapse: 'collapse', + }, + tableHeaderRow: { + backgroundColor: '#f2f2f2', + borderBottom: '1px solid black', + }, + requestTableHeader: { + fontSize: '18px', + padding: '10px', + }, + requestTitleHeader: { + textTransform: 'capitalize', + padding: '10px', + fontWeight: 'bold', + }, + actionsStyling: { + gap: '5px', + padding: '5px', + }, +}; + + export default SearchRequests;