diff --git a/frontend/package-lock.json b/frontend/package-lock.json index cae5f529..6ac76f3f 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -20,6 +20,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", @@ -5845,6 +5846,14 @@ "node": ">=6" } }, + "node_modules/qrcode.react": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/qrcode.react/-/qrcode.react-4.1.0.tgz", + "integrity": "sha512-uqXVIIVD/IPgWLYxbOczCNAQw80XCM/LulYDADF+g2xDsPj5OoRwSWtIS4jGyp295wyjKstfG1qIv/I2/rNWpQ==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index 30fb2c05..54fbfc8b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -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", diff --git a/frontend/src/components/pages/AppPollPage.tsx b/frontend/src/components/pages/AppPollPage.tsx new file mode 100644 index 00000000..5329d8d6 --- /dev/null +++ b/frontend/src/components/pages/AppPollPage.tsx @@ -0,0 +1,38 @@ +import { QRCodeSVG } from "qrcode.react" + +export const AppPollPage = () => { + const pageData = fetchGraphData() + + return
+
+

{pageData.question}

+
+ + {/* Mammaen */} +
+ + {/* Kid 1 */} +
+
+ + {/* Kid 2 */} +
+ +
+
+ +
+} + +const fetchGraphData = () => { + return { + question: "Hvor sitter du og jobber?", + data: { + "A4": 24, + "Biblioteket": 48 + }, + appUrl: "https://www.appkom.no/" + } + + +} \ No newline at end of file diff --git a/frontend/src/components/pages/MainPage.tsx b/frontend/src/components/pages/MainPage.tsx index 9d4dd162..8ce6e6d5 100644 --- a/frontend/src/components/pages/MainPage.tsx +++ b/frontend/src/components/pages/MainPage.tsx @@ -6,6 +6,7 @@ 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 @@ -13,27 +14,32 @@ export const MainPage = () => { { component: , duration: 60, - probability: 0.40, + probability: 0.01, }, { component: , duration: 60, - probability: 0.30, + probability: 0.01, }, { component: , duration: 60, - probability: 0.05, + probability: 0.01, }, { component: , duration: 60, - probability: 0.10, + probability: 0.01, }, { component: , duration: 30, - probability: 0.15, + probability: 0.01, + }, + { + component: , + duration: 60, + probability: 0.95, }, ];