diff --git a/configurations/statemachine.json b/configurations/statemachine.json index c77d693..97651ed 100644 --- a/configurations/statemachine.json +++ b/configurations/statemachine.json @@ -28,7 +28,7 @@ }, "Body": { "Html": { - "Data.$": "States.Format('

Hello {}

Congratulations on completing the quiz!

Your Score: {}/{}.

Best regards,
Quiz Team

', $.Username, $.Score, $.TotalQuestions)", + "Data.$": "States.Format('

Hello {}

Congratulations on completing the quiz!

Your Score: {}.

Best regards,
LocalStack Team

', $.Username, $.Score)", "Charset": "UTF-8" } } diff --git a/frontend/src/components/LeaderboardPage.js b/frontend/src/components/LeaderboardPage.js index ab12652..7eb7421 100644 --- a/frontend/src/components/LeaderboardPage.js +++ b/frontend/src/components/LeaderboardPage.js @@ -11,6 +11,7 @@ import { CircularProgress, Alert, Paper, + Stack, } from '@mui/material'; function LeaderboardPage() { @@ -44,6 +45,20 @@ function LeaderboardPage() { navigate('/'); }; + const handleViewEmailDemo = () => { + let targetURL = ''; + const hostname = window.location.hostname; + + if (hostname.includes('localhost')) { + targetURL = `http://localhost:4566/_extension/mailhog/`; + } else { + const baseOrigin = window.location.origin; + targetURL = `${baseOrigin}/_extension/mailhog/`; + } + + window.open(targetURL, '_blank'); + }; + if (loading) { return ( @@ -90,9 +105,14 @@ function LeaderboardPage() { )} - + + + +