-
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.
added base code for future end of stream report view
- Loading branch information
Showing
6 changed files
with
172 additions
and
29 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
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,24 @@ | ||
// src/components/ReportViewer.js | ||
import React from 'react'; | ||
import { ReportData } from '../types'; | ||
|
||
interface ReportDataProps { | ||
reportData: ReportData | null | ||
} | ||
|
||
const ReportViewer: React.FC<ReportDataProps> = ({ reportData }): JSX.Element => { | ||
if (!reportData) return <p>No report data available</p>; | ||
console.log("Report Data: ", reportData); | ||
return ( | ||
<div style={{ padding: '20px' }}> | ||
<h1>npChatbot Final Report</h1> | ||
<div className="report-section"> | ||
<h2>Report Summary</h2> | ||
<p>{reportData.dj_name || 'Summary not available'}</p> | ||
</div> | ||
{/* Add more sections with styled data from the report */} | ||
</div> | ||
); | ||
}; | ||
|
||
export default ReportViewer; |
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,20 @@ | ||
// src/types.ts | ||
export interface ReportData { | ||
dj_name: string; | ||
set_start_time: string; | ||
playlist_date: string; | ||
set_length: string; | ||
set_length_hours: number; | ||
set_length_minutes: number; | ||
set_length_seconds: number; | ||
average_track_length: string; | ||
shortest_track_name: string; | ||
shortest_track_length: string; | ||
shortest_track_minutes: number; | ||
shortest_track_seconds: number; | ||
longest_track_name: string; | ||
longest_track_length: string; | ||
longest_track_minutes: number; | ||
longest_track_seconds: number; | ||
total_tracks_played: number; | ||
} |
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