Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

181 polls fra appen #192

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"framer-motion": "^11.11.8",
"lucide-react": "^0.445.0",
"moment": "^2.30.1",
"qrcode.react": "^4.1.0",
"react": "^18.3.1",
"react-circular-progressbar": "^2.1.0",
"react-dom": "^18.3.1",
Expand Down
38 changes: 38 additions & 0 deletions frontend/src/components/pages/AppPollPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { QRCodeSVG } from "qrcode.react"

export const AppPollPage = () => {
const pageData = fetchGraphData()

return <div className="flex flex-col items-center w-full h-full justify-between p-5 gap-5" >
<div>
<h1 className="text-5xl font-mono">{pageData.question}</h1>
</div>

{/* Mammaen */}
<div className="bg-red-900 flex-row flex w-4/5 h-full gap-52 ">

{/* Kid 1 */}
<div className="bg-green-900 h-full w-full" >
</div>

{/* Kid 2 */}
<div className="bg-yellow-500 h-full w-1/3 flex flex-col items-center justify-end p-5">
<QRCodeSVG value={pageData.appUrl} className="w-full h-auto p-5" />
</div>
</div>

</div>
}

const fetchGraphData = () => {
return {
question: "Hvor sitter du og jobber?",
data: {
"A4": 24,
"Biblioteket": 48
},
appUrl: "https://www.appkom.no/"
}


}
16 changes: 11 additions & 5 deletions frontend/src/components/pages/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,40 @@ import { ChristmasPage } from './ChristmasPage';
import { EventsPage } from './EventsPage';
import { SlackPage } from './SlackPage';
import { VideoPage } from './VideoPage';
import { AppPollPage } from './AppPollPage';

export const MainPage = () => {
// All pages with their respective probabilities and durations in seconds
const pages = [
{
component: <EventsPage />,
duration: 60,
probability: 0.40,
probability: 0.01,
},
{
component: <SlackPage />,
duration: 60,
probability: 0.30,
probability: 0.01,
},
{
component: <VideoPage pageDuration={60} />,
duration: 60,
probability: 0.05,
probability: 0.01,
},
{
component: <ChristmasPage />,
duration: 60,
probability: 0.10,
probability: 0.01,
},
{
component: <OnlineAppBlastPage />,
duration: 30,
probability: 0.15,
probability: 0.01,
},
{
component: <AppPollPage />,
duration: 60,
probability: 0.95,
},
];

Expand Down