Skip to content

Commit

Permalink
Updated Logger and timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
harshau007 committed Jun 17, 2024
1 parent 7481a37 commit 97b5448
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
Binary file modified build/bin/welcome
Binary file not shown.
2 changes: 1 addition & 1 deletion frontend/src/components/CountrySelectionScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const CountrySelectionScreen: React.FC<{
setIncludeHttp(false);
setSortBy("rate");
setMaxMirrors(20);
setTimeout(10);
setTimeout(30);
clearLogs();
}
};
Expand Down
17 changes: 12 additions & 5 deletions frontend/src/components/Logger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ interface LoggerProps {
const Logger: React.FC<LoggerProps> = ({ isDarkMode }) => {
const { logs, addLog, isEmpty } = useLogsContext();
const loggerRef = useRef<HTMLDivElement>(null);
var logState = isEmpty();

useEffect(() => {
const logEventHandler = (message: string) => {
Expand Down Expand Up @@ -37,11 +38,17 @@ const Logger: React.FC<LoggerProps> = ({ isDarkMode }) => {
}`}
style={{ maxHeight: "400px" }}
>
<div className="flex flex-col space-y-2 m-5 text-pretty">
{logs.map((log, index) => (
<div key={index}>{"◉ " + log}</div>
))}
</div>
{logState ? (
<div className="flex items-center justify-center h-full text-2xl opacity-50 pointer-events-none">
No Logs
</div>
) : (
<div className="flex flex-col space-y-2 m-5 text-pretty">
{logs.map((log, index) => (
<div key={index}>{"◉ " + log}</div>
))}
</div>
)}
</div>
</div>
);
Expand Down

0 comments on commit 97b5448

Please sign in to comment.