diff --git a/.gitignore b/.gitignore index 500187a16..b8265a6ce 100644 --- a/.gitignore +++ b/.gitignore @@ -38,4 +38,8 @@ yarn-error.log* *.tsbuildinfo next-env.d.ts -*storybook.log \ No newline at end of file +*storybook.log + +# ignore yarn.lock & package-lock +yarn.lock +package-lock.json \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit index 8bb00479e..d663f7203 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -4,4 +4,9 @@ npm run format:fix npm run lint:fix -git add . \ No newline at end of file +git add . + +if [ -f "yarn.lock" ] || [ -f "package-lock.json" ]; then + echo "Error: yarn.lock or package-lock.json is present. Please remove them before committing." + exit 1 +fi \ No newline at end of file diff --git a/package.json b/package.json index d4b82d213..e439c1aec 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts" }, "scripts": { + "preinstall": "npx only-allow pnpm", "postinstall": "prisma generate", "dev": "next dev", "build": "next build", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 72a005d2b..9304d93c3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,6 +44,12 @@ importers: '@radix-ui/react-navigation-menu': specifier: ^1.1.4 version: 1.2.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-popover': + specifier: ^1.1.1 + version: 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-scroll-area': + specifier: ^1.1.0 + version: 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-slot': specifier: ^1.0.2 version: 1.1.0(@types/react@18.3.3)(react@18.3.1) @@ -71,6 +77,9 @@ importers: clsx: specifier: ^2.1.0 version: 2.1.1 + date-fns: + specifier: ^3.6.0 + version: 3.6.0 dayjs: specifier: ^1.11.10 version: 1.11.12 @@ -125,6 +134,12 @@ importers: react: specifier: ^18 version: 18.3.1 + react-big-calendar: + specifier: ^1.13.2 + version: 1.13.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react-day-picker: + specifier: 8.10.1 + version: 8.10.1(date-fns@3.6.0)(react@18.3.1) react-dom: specifier: ^18 version: 18.3.1(react@18.3.1) @@ -219,6 +234,9 @@ importers: '@types/react': specifier: ^18 version: 18.3.3 + '@types/react-big-calendar': + specifier: ^1.8.9 + version: 1.8.10 '@types/react-dom': specifier: ^18 version: 18.3.0 @@ -1529,6 +1547,9 @@ packages: webpack-plugin-serve: optional: true + '@popperjs/core@2.11.8': + resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} + '@prisma/client@5.18.0': resolution: {integrity: sha512-BWivkLh+af1kqC89zCJYkHsRcyWsM8/JHpsDMM76DjP3ZdEquJhXa4IeX+HkWPnwJ5FanxEJFZZDTWiDs/Kvyw==} engines: {node: '>=16.13'} @@ -1553,6 +1574,9 @@ packages: '@prisma/get-platform@5.18.0': resolution: {integrity: sha512-Tk+m7+uhqcKDgnMnFN0lRiH7Ewea0OEsZZs9pqXa7i3+7svS3FSCqDBCaM9x5fmhhkufiG0BtunJVDka+46DlA==} + '@radix-ui/number@1.1.0': + resolution: {integrity: sha512-V3gRzhVNU1ldS5XhAPTom1fOIo4ccrjjJgmE+LI2h/WaFpHmx0MQApT+KZHnx8abG6Avtfcz4WoEciMnpFT3HQ==} + '@radix-ui/primitive@1.1.0': resolution: {integrity: sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==} @@ -1757,6 +1781,19 @@ packages: '@types/react-dom': optional: true + '@radix-ui/react-popover@1.1.1': + resolution: {integrity: sha512-3y1A3isulwnWhvTTwmIreiB8CF4L+qRjZnK1wYLO7pplddzXKby/GnZ2M7OZY3qgnl6p9AodUIHRYGXNah8Y7g==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-popper@1.2.0': resolution: {integrity: sha512-ZnRMshKF43aBxVWPWvbj21+7TQCvhuULWJ4gNIKYpRlQt5xGRhLx66tMp8pya2UkGHTSlhpXwmjqltDYHhw7Vg==} peerDependencies: @@ -1822,6 +1859,19 @@ packages: '@types/react-dom': optional: true + '@radix-ui/react-scroll-area@1.1.0': + resolution: {integrity: sha512-9ArIZ9HWhsrfqS765h+GZuLoxaRHD/j0ZWOWilsCvYTpYJp8XwCqNG7Dt9Nu/TItKOdgLGkOPCodQvDc+UMwYg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-slot@1.1.0': resolution: {integrity: sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==} peerDependencies: @@ -1923,6 +1973,11 @@ packages: '@radix-ui/rect@1.1.0': resolution: {integrity: sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==} + '@restart/hooks@0.4.16': + resolution: {integrity: sha512-f7aCv7c+nU/3mF7NWLtVVr0Ra80RqsO89hO72r+Y/nvQr5+q0UFGkocElTH6MJApvReVh6JHUFYn2cw1WdHF3w==} + peerDependencies: + react: '>=16.8.0' + '@rollup/rollup-android-arm-eabi@4.21.0': resolution: {integrity: sha512-WTWD8PfoSAJ+qL87lE7votj3syLavxunWhzCnx3XFxFiI/BA/r3X7MUM8dVrH8rb2r4AiO8jJsr3ZjdaftmnfA==} cpu: [arm] @@ -2336,6 +2391,9 @@ packages: '@types/cross-spawn@6.0.6': resolution: {integrity: sha512-fXRhhUkG4H3TQk5dBhQ7m/JDdSNHKwR2BBia62lhwEIq9xGiQKLxd6LymNhn47SjXhsUEPmxi+PKw2OkW4LLjA==} + '@types/date-arithmetic@4.1.4': + resolution: {integrity: sha512-p9eZ2X9B80iKiTW4ukVj8B4K6q9/+xFtQ5MGYA5HWToY9nL4EkhV9+6ftT2VHpVMEZb5Tv00Iel516bVdO+yRw==} + '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} @@ -2432,6 +2490,9 @@ packages: '@types/range-parser@1.2.7': resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} + '@types/react-big-calendar@1.8.10': + resolution: {integrity: sha512-HczsLxbLic0wppijPYay9fNaJjYAM9umdKY/0Jats1u3RyYHl+6uHX+uwMVk/ssX6JfuP6tKOhvVld/9xgtFgA==} + '@types/react-dom@18.3.0': resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==} @@ -2462,6 +2523,9 @@ packages: '@types/uuid@9.0.8': resolution: {integrity: sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==} + '@types/warning@3.0.3': + resolution: {integrity: sha512-D1XC7WK8K+zZEveUPY+cf4+kgauk8N4eHr/XIHXGlGYkHLud6hK9lYfZk1ry1TNh798cZUCgb6MqGEG8DkJt6Q==} + '@types/ws@8.5.12': resolution: {integrity: sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==} @@ -3131,6 +3195,10 @@ packages: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} + clsx@1.2.1: + resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==} + engines: {node: '>=6'} + clsx@2.0.0: resolution: {integrity: sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==} engines: {node: '>=6'} @@ -3342,6 +3410,12 @@ packages: resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} engines: {node: '>=18'} + date-arithmetic@4.1.0: + resolution: {integrity: sha512-QWxYLR5P/6GStZcdem+V1xoto6DMadYWpMXU82ES3/RfR3Wdwr3D0+be7mgOJ+Ov0G9D5Dmb9T17sNLQYj9XOg==} + + date-fns@3.6.0: + resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==} + dayjs@1.11.12: resolution: {integrity: sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg==} @@ -3495,6 +3569,9 @@ packages: dom-converter@0.2.0: resolution: {integrity: sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==} + dom-helpers@5.2.1: + resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==} + dom-serializer@1.4.1: resolution: {integrity: sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==} @@ -3982,6 +4059,9 @@ packages: global@4.4.0: resolution: {integrity: sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==} + globalize@0.1.1: + resolution: {integrity: sha512-5e01v8eLGfuQSOvx2MsDMOWS0GFtCx1wPzQSmcHw4hkxFzrQDBO3Xwg/m8Hr/7qXMrHeOIE29qWVzyv06u1TZA==} + globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} @@ -4558,6 +4638,9 @@ packages: resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + lodash-es@4.17.21: + resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} + lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} @@ -4633,6 +4716,10 @@ packages: peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 + luxon@3.5.0: + resolution: {integrity: sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==} + engines: {node: '>=12'} + lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true @@ -4749,6 +4836,9 @@ packages: resolution: {integrity: sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==} engines: {node: '>= 4.0.0'} + memoize-one@6.0.0: + resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==} + memoizerific@1.11.3: resolution: {integrity: sha512-/EuHYwAPdLtXwAwSZkh/Gutery6pD2KYd44oQLhAvQp/50mpyduZh8Q7PYHXTCJ+wuXxt7oij2LXyIJOOYFPog==} @@ -4949,6 +5039,12 @@ packages: mlly@1.7.1: resolution: {integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==} + moment-timezone@0.5.45: + resolution: {integrity: sha512-HIWmqA86KcmCAhnMAN0wuDOARV/525R2+lOLotuGFzn4HO+FH+/645z2wx0Dt3iDv6/p61SIvKnDstISainhLQ==} + + moment@2.30.1: + resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==} + mpd-parser@1.3.0: resolution: {integrity: sha512-WgeIwxAqkmb9uTn4ClicXpEQYCEduDqRKfmUdp4X8vmghKfBNXZLYpREn9eqrDx/Tf5LhzRcJLSpi4ohfV742Q==} hasBin: true @@ -5685,6 +5781,12 @@ packages: resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} engines: {node: '>= 0.8'} + react-big-calendar@1.13.4: + resolution: {integrity: sha512-eTc67wNHrEbtK7SW2dKlAWjPTcaMfg8BaL5ei4BQ/5FKzVOt3LrmBiq7hr9sOxOYtOfMRxWYMkjkZRvrlRWRBw==} + peerDependencies: + react: ^16.14.0 || ^17 || ^18 + react-dom: ^16.14.0 || ^17 || ^18 + react-colorful@5.6.1: resolution: {integrity: sha512-1exovf0uGTGyq5mXQT0zgQ80uvj2PCwvF8zY1RN9/vbJVSjSo3fsB/4L3ObbF7u70NduSiK4xu4Y6q1MHoUGEw==} peerDependencies: @@ -5697,6 +5799,12 @@ packages: peerDependencies: react: ^16.3.0 || ^17.0.1 || ^18.0.0 + react-day-picker@8.10.1: + resolution: {integrity: sha512-TMx7fNbhLk15eqcMt+7Z7S2KF7mfTId/XJDjKE8f+IUcFn0l08/kI4FiYTL/0yuOLmEcbR4Fwe3GJf/NiiMnPA==} + peerDependencies: + date-fns: ^2.28.0 || ^3.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-docgen-typescript@2.2.2: resolution: {integrity: sha512-tvg2ZtOpOi6QDwsb3GZhOjDkkX0h8Z2gipvTg6OVMUyoYoURhEiRNePT8NZItTVCDh39JJHnLdfCOkzoLbFnTg==} peerDependencies: @@ -5790,6 +5898,12 @@ packages: react: '>=16' react-dom: '>=16' + react-overlays@5.2.1: + resolution: {integrity: sha512-GLLSOLWr21CqtJn8geSwQfoJufdt3mfdsnIiQswouuQ2MMPns+ihZklxvsTDKD3cR2tF8ELbi5xUsvqVhR6WvA==} + peerDependencies: + react: '>=16.3.0' + react-dom: '>=16.3.0' + react-pdf@5.7.2: resolution: {integrity: sha512-hdDwvf007V0i2rPCqQVS1fa70CXut17SN3laJYlRHzuqcu8sLLjEoeXihty6c0Ev5g1mw31b8OT8EwRw1s8C4g==} peerDependencies: @@ -6615,6 +6729,11 @@ packages: ufo@1.5.4: resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + uncontrollable@7.2.1: + resolution: {integrity: sha512-svtcfoTADIB0nT9nltgjujTi7BzVmwjZClOmskKu/E8FW9BXzg9os8OLr4f8Dlnk0rYWJIWr4wv9eKUXiQvQwQ==} + peerDependencies: + react: '>=15.0.0' + undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} @@ -8459,6 +8578,8 @@ snapshots: type-fest: 2.19.0 webpack-hot-middleware: 2.26.1 + '@popperjs/core@2.11.8': {} + '@prisma/client@5.18.0(prisma@5.18.0)': optionalDependencies: prisma: 5.18.0 @@ -8484,6 +8605,8 @@ snapshots: dependencies: '@prisma/debug': 5.18.0 + '@radix-ui/number@1.1.0': {} + '@radix-ui/primitive@1.1.0': {} '@radix-ui/react-accordion@1.2.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': @@ -8701,6 +8824,29 @@ snapshots: '@types/react': 18.3.3 '@types/react-dom': 18.3.0 + '@radix-ui/react-popover@1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/primitive': 1.1.0 + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-context': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-dismissable-layer': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-focus-guards': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-focus-scope': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-id': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-popper': 1.2.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-portal': 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-presence': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-slot': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.3.3)(react@18.3.1) + aria-hidden: 1.2.4 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react-remove-scroll: 2.5.7(@types/react@18.3.3)(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.3 + '@types/react-dom': 18.3.0 + '@radix-ui/react-popper@1.2.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@floating-ui/react-dom': 2.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -8765,6 +8911,23 @@ snapshots: '@types/react': 18.3.3 '@types/react-dom': 18.3.0 + '@radix-ui/react-scroll-area@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/number': 1.1.0 + '@radix-ui/primitive': 1.1.0 + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-context': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-direction': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-presence': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.3)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.3 + '@types/react-dom': 18.3.0 + '@radix-ui/react-slot@1.1.0(@types/react@18.3.3)(react@18.3.1)': dependencies: '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.3)(react@18.3.1) @@ -8849,6 +9012,11 @@ snapshots: '@radix-ui/rect@1.1.0': {} + '@restart/hooks@0.4.16(react@18.3.1)': + dependencies: + dequal: 2.0.3 + react: 18.3.1 + '@rollup/rollup-android-arm-eabi@4.21.0': optional: true @@ -9469,6 +9637,8 @@ snapshots: dependencies: '@types/node': 20.16.0 + '@types/date-arithmetic@4.1.4': {} + '@types/debug@4.1.12': dependencies: '@types/ms': 0.7.34 @@ -9567,6 +9737,12 @@ snapshots: '@types/range-parser@1.2.7': {} + '@types/react-big-calendar@1.8.10': + dependencies: + '@types/date-arithmetic': 4.1.4 + '@types/prop-types': 15.7.12 + '@types/react': 18.3.3 + '@types/react-dom@18.3.0': dependencies: '@types/react': 18.3.3 @@ -9601,6 +9777,8 @@ snapshots: '@types/uuid@9.0.8': {} + '@types/warning@3.0.3': {} + '@types/ws@8.5.12': dependencies: '@types/node': 20.16.0 @@ -10450,6 +10628,8 @@ snapshots: clone@1.0.4: {} + clsx@1.2.1: {} + clsx@2.0.0: {} clsx@2.1.1: {} @@ -10658,6 +10838,10 @@ snapshots: whatwg-mimetype: 4.0.0 whatwg-url: 14.0.0 + date-arithmetic@4.1.0: {} + + date-fns@3.6.0: {} + dayjs@1.11.12: {} debug@2.6.9: @@ -10791,6 +10975,11 @@ snapshots: dependencies: utila: 0.4.0 + dom-helpers@5.2.1: + dependencies: + '@babel/runtime': 7.25.0 + csstype: 3.1.3 + dom-serializer@1.4.1: dependencies: domelementtype: 2.3.0 @@ -11394,6 +11583,8 @@ snapshots: min-document: 2.19.0 process: 0.11.10 + globalize@0.1.1: {} + globals@11.12.0: {} globals@13.24.0: @@ -12082,6 +12273,8 @@ snapshots: dependencies: p-locate: 6.0.0 + lodash-es@4.17.21: {} + lodash.debounce@4.0.8: {} lodash.defaults@4.2.0: {} @@ -12143,6 +12336,8 @@ snapshots: dependencies: react: 18.3.1 + luxon@3.5.0: {} + lz-string@1.5.0: {} m3u8-parser@7.1.0: @@ -12366,6 +12561,8 @@ snapshots: dependencies: fs-monkey: 1.0.6 + memoize-one@6.0.0: {} + memoizerific@1.11.3: dependencies: map-or-similar: 1.5.0 @@ -12647,6 +12844,12 @@ snapshots: pkg-types: 1.1.3 ufo: 1.5.4 + moment-timezone@0.5.45: + dependencies: + moment: 2.30.1 + + moment@2.30.1: {} + mpd-parser@1.3.0: dependencies: '@babel/runtime': 7.25.0 @@ -13346,6 +13549,27 @@ snapshots: iconv-lite: 0.4.24 unpipe: 1.0.0 + react-big-calendar@1.13.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + '@babel/runtime': 7.25.0 + clsx: 1.2.1 + date-arithmetic: 4.1.0 + dayjs: 1.11.12 + dom-helpers: 5.2.1 + globalize: 0.1.1 + invariant: 2.2.4 + lodash: 4.17.21 + lodash-es: 4.17.21 + luxon: 3.5.0 + memoize-one: 6.0.0 + moment: 2.30.1 + moment-timezone: 0.5.45 + prop-types: 15.8.1 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react-overlays: 5.2.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + uncontrollable: 7.2.1(react@18.3.1) + react-colorful@5.6.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: react: 18.3.1 @@ -13356,6 +13580,11 @@ snapshots: react: 18.3.1 tween-functions: 1.2.0 + react-day-picker@8.10.1(date-fns@3.6.0)(react@18.3.1): + dependencies: + date-fns: 3.6.0 + react: 18.3.1 + react-docgen-typescript@2.2.2(typescript@5.5.4): dependencies: typescript: 5.5.4 @@ -13483,6 +13712,19 @@ snapshots: - webpack - worker-loader + react-overlays@5.2.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + '@babel/runtime': 7.25.0 + '@popperjs/core': 2.11.8 + '@restart/hooks': 0.4.16(react@18.3.1) + '@types/warning': 3.0.3 + dom-helpers: 5.2.1 + prop-types: 15.8.1 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + uncontrollable: 7.2.1(react@18.3.1) + warning: 4.0.3 + react-pdf@5.7.2(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(webpack@5.93.0(esbuild@0.21.5)): dependencies: '@babel/runtime': 7.25.0 @@ -14458,6 +14700,14 @@ snapshots: ufo@1.5.4: {} + uncontrollable@7.2.1(react@18.3.1): + dependencies: + '@babel/runtime': 7.25.0 + '@types/react': 18.3.3 + invariant: 2.2.4 + react: 18.3.1 + react-lifecycles-compat: 3.0.4 + undici-types@5.26.5: {} undici-types@6.19.6: {} diff --git a/src/app/admin/content/[courseId]/[...moduleId]/page.tsx b/src/app/admin/content/[courseId]/[...moduleId]/page.tsx index 2cb0ef4c9..dcb46ee81 100644 --- a/src/app/admin/content/[courseId]/[...moduleId]/page.tsx +++ b/src/app/admin/content/[courseId]/[...moduleId]/page.tsx @@ -13,18 +13,20 @@ export default async function UpdateCourseContent({ const rest = params.moduleId; const course = await getCourse(parseInt(courseId, 10)); const fullCourseContent = await getFullCourseContent(parseInt(courseId, 10)); + const courseContent = findContentById( fullCourseContent, rest.map((x) => parseInt(x, 10)), ); - const contentType = - courseContent?.length === 1 ? courseContent[0]?.type : 'folder'; + const contentType = courseContent?.folder + ? 'folder' + : courseContent?.value?.type; if (contentType === 'video') { return (
{/* @ts-ignore */} - +
); } @@ -48,11 +50,12 @@ export default async function UpdateCourseContent({ /> ({ + // @ts-ignore + courseContent={courseContent?.value?.map((x: any) => ({ title: x?.title || '', image: x?.thumbnail || '', id: x?.id || 0, + createdAt: x?.createdAt, }))} courseId={parseInt(courseId, 10)} /> diff --git a/src/app/admin/content/[courseId]/page.tsx b/src/app/admin/content/[courseId]/page.tsx index da3154ef9..8680bca3c 100644 --- a/src/app/admin/content/[courseId]/page.tsx +++ b/src/app/admin/content/[courseId]/page.tsx @@ -16,8 +16,9 @@ export default async function UpdateCourseContent({ fullCourseContent, rest.map((x) => parseInt(x, 10)), ); - const contentType = - courseContent?.length === 1 ? courseContent[0]?.type : 'folder'; + const contentType = courseContent?.folder + ? 'folder' + : courseContent?.value.type; if (contentType === 'video') { return ( @@ -45,11 +46,12 @@ export default async function UpdateCourseContent({ /> ({ + // @ts-ignore + courseContent={courseContent?.value.map((x: any) => ({ title: x?.title || '', image: x?.thumbnail || '', id: x?.id || 0, + createdAt: x?.createdAt, }))} courseId={parseInt(courseId, 10)} /> diff --git a/src/app/api/search/route.ts b/src/app/api/search/route.ts index 34c8ee68e..84c9643c4 100644 --- a/src/app/api/search/route.ts +++ b/src/app/api/search/route.ts @@ -2,7 +2,7 @@ import { cache } from '@/db/Cache'; import db from '@/db'; import { CourseContent } from '@prisma/client'; import Fuse from 'fuse.js'; -import { NextResponse } from 'next/server'; +import { NextRequest, NextResponse } from 'next/server'; export type TSearchedVideos = { id: number; @@ -21,7 +21,7 @@ const fuzzySearch = (videos: TSearchedVideos[], searchQuery: string) => { return searchedVideos.map((video) => video.item); }; -export async function GET(request: Request) { +export async function GET(request: NextRequest) { const { searchParams } = new URL(request.url); const searchQuery = searchParams.get('q'); diff --git a/src/app/courses/[courseId]/[...moduleId]/page.tsx b/src/app/courses/[courseId]/[...moduleId]/page.tsx index d16571c23..4e057393d 100644 --- a/src/app/courses/[courseId]/[...moduleId]/page.tsx +++ b/src/app/courses/[courseId]/[...moduleId]/page.tsx @@ -20,15 +20,12 @@ export default async function Course({ fullCourseContent, rest.map((x) => parseInt(x, 10)), ); - const contentType = - courseContent?.length === 1 ? courseContent[0]?.type : 'folder'; const nextContent = null; //await getNextVideo(Number(rest[rest.length - 1])) return ( Go Back -
+
{question && (
-
+
diff --git a/src/components/BreadCrumbComponent.tsx b/src/components/BreadCrumbComponent.tsx index 0f1da1379..ba2426a35 100644 --- a/src/components/BreadCrumbComponent.tsx +++ b/src/components/BreadCrumbComponent.tsx @@ -10,7 +10,7 @@ import { } from '@/components/ui/breadcrumb'; import { FullCourseContent } from '@/db/course'; import Link from 'next/link'; -import { useMemo } from 'react'; +import { Fragment, useMemo } from 'react'; export default function BreadCrumbComponent({ rest, @@ -83,7 +83,7 @@ export default function BreadCrumbComponent({ finalRouteArray = [...rest]; } return ( - <> + {index !== array.length - 1 ? ( <> @@ -105,7 +105,7 @@ export default function BreadCrumbComponent({ )} - + ); })} diff --git a/src/components/CardComponent.tsx b/src/components/CardComponent.tsx index 3ecc89669..b557437cc 100644 --- a/src/components/CardComponent.tsx +++ b/src/components/CardComponent.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import bgImage from '../../public/Content-Cover.png'; const CardComponent = ({ title, @@ -14,12 +14,14 @@ const CardComponent = ({ const [, secondPart] = title.split(' | '); return ( -
-
-

+

+ background +
+

100xdevs

diff --git a/src/components/ContentCard.tsx b/src/components/ContentCard.tsx index 58d29c2ea..eabf2464d 100644 --- a/src/components/ContentCard.tsx +++ b/src/components/ContentCard.tsx @@ -1,9 +1,10 @@ -import { CheckCircle2, Play } from 'lucide-react'; +import { CheckCircle2 } from 'lucide-react'; import { Bookmark } from '@prisma/client'; import BookmarkButton from './bookmark/BookmarkButton'; import { formatTime } from '@/lib/utils'; import VideoThumbnail from './videothumbnail'; import CardComponent from './CardComponent'; +import DonutChart from './DonutChart'; export const ContentCard = ({ title, @@ -15,6 +16,7 @@ export const ContentCard = ({ bookmark, contentId, contentDuration, + createdAt, }: { type: 'folder' | 'video' | 'notion'; contentId?: number; @@ -27,26 +29,26 @@ export const ContentCard = ({ hoverExpand?: boolean; bookmark?: Bookmark | null; contentDuration?: number; + createdAt: Date; }) => { - // let image ; - // image = "" + const formattedDate = createdAt?.toLocaleDateString('en-GB', { + day: '2-digit', + month: 'long', + year: 'numeric', + }); + return (

{markAsCompleted && (
)} - {type === 'video' && ( -
- {contentDuration && formatTime(contentDuration)} -
- )} {type !== 'video' && ( -
+
)} {type === 'video' && ( -
+
)} @@ -89,15 +89,17 @@ export const ContentCard = ({

{title}

-

- Posted on: 10 Aug 2024 +

+ Posted on: {formattedDate}

-
-
- + {type === 'video' && videoProgressPercent && ( +
+
-
+ )}
); diff --git a/src/components/CourseCard.tsx b/src/components/CourseCard.tsx index 48a4fc358..366f7eeff 100644 --- a/src/components/CourseCard.tsx +++ b/src/components/CourseCard.tsx @@ -27,7 +27,7 @@ export const CourseCard = ({ const router = useRouter(); return (
{ + const contentType = courseContent?.folder + ? 'folder' + : courseContent?.value.type; return (
-
- +
- {contentType === 'notion' ? ( + {!courseContent?.folder && courseContent?.value.type === 'notion' ? (
- +
) : null} - {contentType === 'video' ? ( + {!courseContent?.folder && contentType === 'video' ? ( ) : null} - {(contentType === 'video' || contentType === 'notion') && ( - - )} - {contentType === 'folder' ? ( + {!courseContent?.folder && + (contentType === 'video' || contentType === 'notion') && ( + + )} + {courseContent?.folder ? ( ({ + courseContent={courseContent?.value.map((x: any) => ({ title: x?.title || '', image: x?.thumbnail || '', type: x?.type || 'folder', @@ -81,6 +95,8 @@ export const CourseView = ({ percentComplete: getFolderPercentCompleted(x?.children), videoFullDuration: x?.videoProgress?.videoFullDuration || 0, duration: x?.videoProgress?.duration || 0, + bookmark: null, + createdAt: x?.createdAt, }))} courseId={parseInt(course.id, 10)} /> diff --git a/src/components/CourseViewToolbar.tsx b/src/components/CourseViewToolbar.tsx new file mode 100644 index 000000000..dc0db42a4 --- /dev/null +++ b/src/components/CourseViewToolbar.tsx @@ -0,0 +1,43 @@ +'use client'; + +import { FullCourseContent } from '@/db/course'; +import BreadCrumbComponent from './BreadCrumbComponent'; +import { Button } from './ui/button'; +import { LuListVideo } from 'react-icons/lu'; +import { useRecoilState } from 'recoil'; +import { sidebarOpen as sidebarOpenAtom } from '@/store/atoms/sidebar'; +import { useEffect, useState } from 'react'; + +export const CourseViewToolbar = ({ + courseData, +}: { + courseData: { + course: any; + contentType: any; + courseContent: any; + fullCourseContent: FullCourseContent[]; + rest: string[]; + }; +}) => { + const [sidebarOpen, setSidebarOpen] = useRecoilState(sidebarOpenAtom); + const [showButtonTitle, setShowButtonTitle] = useState(true); + + useEffect(() => { + if (window.innerWidth < 500) { + setShowButtonTitle(false); + } + }, []); + + return ( +
+ + +
+ ); +}; diff --git a/src/components/Courses.tsx b/src/components/Courses.tsx index af7ad0945..9db8cdd9c 100644 --- a/src/components/Courses.tsx +++ b/src/components/Courses.tsx @@ -8,7 +8,7 @@ export const Courses = ({ courses }: { courses: Course[] }) => { const router = useRouter(); return (
-
+
{courses?.map((course) => ( { + const radius = 23; + const strokeWidth = 5; + const normalizedRadius = radius - strokeWidth / 2; + const circumference = normalizedRadius * 2 * Math.PI; + const strokeDashoffset = circumference - (percentage / 100) * circumference; + + return ( +
+ + {/* Background Circle */} + + {/* Progress Circle */} + + {/* Percentage Text */} + + {percentage}% + + +
+ ); +}; + +export default DonutChart; diff --git a/src/components/FolderView.tsx b/src/components/FolderView.tsx index 0ae56a628..a212174a9 100644 --- a/src/components/FolderView.tsx +++ b/src/components/FolderView.tsx @@ -2,6 +2,8 @@ import { useRouter } from 'next/navigation'; import { ContentCard } from './ContentCard'; import { Bookmark } from '@prisma/client'; +import { sidebarOpen as sidebarOpenAtom } from '@/store/atoms/sidebar'; +import { useRecoilState } from 'recoil'; export const FolderView = ({ courseContent, @@ -20,9 +22,11 @@ export const FolderView = ({ videoFullDuration?: number; duration?: number; bookmark: Bookmark | null; + createdAt: Date; }[]; }) => { const router = useRouter(); + const [sidebarOpen] = useRecoilState(sidebarOpenAtom); if (!courseContent?.length) { return ( @@ -39,7 +43,9 @@ export const FolderView = ({ return (
-
+
{courseContent.map((content) => { const videoProgressPercent = content.type === 'video' && @@ -62,6 +68,7 @@ export const FolderView = ({ videoProgressPercent={videoProgressPercent} bookmark={content.bookmark} contentDuration={content.videoFullDuration} + createdAt={content.createdAt} /> ); })} diff --git a/src/components/NewPostDialog.tsx b/src/components/NewPostDialog.tsx index a3b977316..c30da7580 100644 --- a/src/components/NewPostDialog.tsx +++ b/src/components/NewPostDialog.tsx @@ -137,7 +137,7 @@ export const NewPostDialog = () => { type="submit" className="mb-2 me-2 rounded-lg bg-gradient-to-r from-blue-500 via-blue-600 to-blue-700 text-center text-sm font-medium hover:bg-gradient-to-br dark:text-white" > - Post-it + Post
diff --git a/src/components/RefreshDb.tsx b/src/components/RefreshDb.tsx index fa1f0ff27..06cf7f4d8 100644 --- a/src/components/RefreshDb.tsx +++ b/src/components/RefreshDb.tsx @@ -2,9 +2,10 @@ import { Button } from './ui/button'; import { toast } from 'sonner'; import { useSession } from 'next-auth/react'; +import { RefreshCw } from 'lucide-react'; //@ts-ignore -export function RefreshDb({ refreshDb }) { +export function RefreshDb({ refreshDb, expanded }) { const session = useSession(); const handleClick = async () => { @@ -17,13 +18,13 @@ export function RefreshDb({ refreshDb }) { } }; - if (session.status === 'loading') return <>Loading...; + // if (session.status === 'loading') return <>Loading...; return (
-

Don't see all your courses?

+ {expanded &&

Don't see all your courses?

}
); diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 4cb4df1a7..5024d1ae6 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -6,7 +6,7 @@ import { AccordionItem, AccordionTrigger, } from '@/components/ui/accordion'; -import { X, ChevronRight } from 'lucide-react'; +import { X } from 'lucide-react'; import { FullCourseContent } from '@/db/course'; import { useRecoilState } from 'recoil'; import { sidebarOpen as sidebarOpenAtom } from '@/store/atoms/sidebar'; @@ -151,37 +151,27 @@ export function Sidebar({ }); }; - if (!sidebarOpen) { - return ( -
setSidebarOpen((s) => !s)} - className="mt-2 cursor-pointer" - > - -
- ); - } - return ( -
-
-

Course Content

-
{ - setSidebarOpen((s) => !s); - }} - > - + <> + {sidebarOpen && ( +
+
+

Course Content

+
{ + setSidebarOpen((s) => !s); + }} + > + +
+
+ + {/* Render course content */} + {renderContent(fullCourseContent)} +
-
- - {/* Render course content */} - {renderContent(fullCourseContent)} - -
+ )} + ); } diff --git a/src/components/VideoContentChapters.tsx b/src/components/VideoContentChapters.tsx index 098921581..c16c4a9b4 100644 --- a/src/components/VideoContentChapters.tsx +++ b/src/components/VideoContentChapters.tsx @@ -34,7 +34,7 @@ const VideoContentChapters = ({ }, [player]); return ( -
+
Chapters diff --git a/src/components/WatchHistoryClient.tsx b/src/components/WatchHistoryClient.tsx index 5e61b600c..7d973b1ec 100644 --- a/src/components/WatchHistoryClient.tsx +++ b/src/components/WatchHistoryClient.tsx @@ -11,28 +11,30 @@ import { CarouselPrevious, } from '@/components/ui/carousel'; -const WatchHistoryClient = ({ history }: { history: TWatchHistory[] }) => ( - - - {history.map((progress) => ( - - - - ))} - - - - -); +const WatchHistoryClient = ({ history }: { history: TWatchHistory[] }) => { + return ( + + + {history.map((progress) => ( + + + + ))} + + + + + ); +}; const HistoryCard = ({ id, contentId, currentTimestamp, - content: { type, title, thumbnail, hidden, parent, VideoMetadata }, + content: { type, title, thumbnail, hidden, parent, VideoMetadata, createdAt }, }: TWatchHistory) => { const router = useRouter(); @@ -44,6 +46,7 @@ const HistoryCard = ({ const videoProgressPercent = videoDuration ? Math.round((currentTimestamp / videoDuration) * 100) : 0; + return ( ); } diff --git a/src/components/admin/ContentRenderer.tsx b/src/components/admin/ContentRenderer.tsx index 4032c58da..e29bc143a 100644 --- a/src/components/admin/ContentRenderer.tsx +++ b/src/components/admin/ContentRenderer.tsx @@ -4,7 +4,8 @@ import { authOptions } from '@/lib/auth'; import { ContentRendererClient } from './ContentRendererClient'; import { Bookmark } from '@prisma/client'; -function bunnyUrl(url: string) { +function bunnyUrl(url?: string) { + if (!url) return ''; return url .replace('https://appxcontent.kaxa.in', 'https://appxcontent.b-cdn.net') .replace( diff --git a/src/components/admin/ContentRendererClient.tsx b/src/components/admin/ContentRendererClient.tsx index 0a0a3c15f..7c5625bba 100644 --- a/src/components/admin/ContentRendererClient.tsx +++ b/src/components/admin/ContentRendererClient.tsx @@ -71,8 +71,8 @@ export const ContentRendererClient = ({ return (
-
-
+ ); diff --git a/src/components/admin/CourseContent.tsx b/src/components/admin/CourseContent.tsx index 2546d342c..c552c20e2 100644 --- a/src/components/admin/CourseContent.tsx +++ b/src/components/admin/CourseContent.tsx @@ -12,6 +12,7 @@ export const AdminCourseContent = ({ title: string; image: string; id: number; + createdAt: Date; }[]; rest: string[]; }) => { @@ -26,7 +27,12 @@ export const AdminCourseContent = ({ Course content
{courseContent?.map( - (content: { image: string; id: number; title: string }) => ( + (content: { + image: string; + id: number; + title: string; + createdAt: Date; + }) => ( ), ) ?? []} diff --git a/src/components/bookmark/BookmarkList.tsx b/src/components/bookmark/BookmarkList.tsx index 1d9e817b2..e611b0a27 100644 --- a/src/components/bookmark/BookmarkList.tsx +++ b/src/components/bookmark/BookmarkList.tsx @@ -22,7 +22,7 @@ const BookmarkList = ({ {bookmarkData.map((bookmark) => { const { contentId, - content: { type, parent, title, hidden, thumbnail }, + content: { type, parent, title, hidden, thumbnail, createdAt }, } = bookmark; if (type === 'video' && parent && !hidden) { const { id: folderId, courses } = parent; @@ -40,6 +40,7 @@ const BookmarkList = ({ }} bookmark={bookmark} contentId={contentId} + createdAt={createdAt} /> ); } diff --git a/src/components/landing/logo/logo.tsx b/src/components/landing/logo/logo.tsx index 789a6def0..de3a6b49e 100644 --- a/src/components/landing/logo/logo.tsx +++ b/src/components/landing/logo/logo.tsx @@ -12,7 +12,7 @@ const Logo = ({ onFooter = false }: { onFooter: boolean }) => {
{ return ( @@ -43,7 +42,7 @@ const DailyCodeSection = () => {
{'dailycode'} {
{'platform'} { @@ -44,7 +43,7 @@ const DiscordSection = () => {
{'platform'} {
{'platform'} = ({
+ {!isAnswer && !enableLink && isExtendedQuestion(post) && ( + <> + + {post?.title} + + + )} + {!isAnswer && enableLink && isExtendedQuestion(post) && ( - + {post?.title} )} - + + {post.content && ( +
+
+ +
+ )} +
+ {isExtendedQuestion(post) && + post.tags + .filter((v) => v !== '') + .map((v, index) => )} +
= ({ ))}
- {isExtendedQuestion(post) && - post.tags - .filter((v) => v !== '') - .map((v, index) => )} {/* {!isAnswer && enableLink && isExtendedQuestion(post) && ( @@ -205,46 +230,6 @@ const PostCard: React.FC = ({ )} */} - {!isAnswer && !enableLink && isExtendedQuestion(post) && ( - - {post?.title} - - )} - {post.content && ( -
-
- -
- )} - - {enableReply && ( -
-
-
-
-
- - - -
-
-
- )}
); }; @@ -255,6 +240,24 @@ const PostCard: React.FC = ({ {internalDetails()}
+ {enableReply && ( +
+
+
+
+ + + +
+
+
+ )} ); }; diff --git a/src/components/search.tsx b/src/components/search.tsx index ee01a955c..57ac89386 100644 --- a/src/components/search.tsx +++ b/src/components/search.tsx @@ -18,8 +18,8 @@ const Search = () => { router.push(getUpdatedUrl(path, paramsObj, { search })); }; return ( -
- +
+ { type="submit" onClick={handleSearch} > - Search +

Search

+
); diff --git a/src/components/sidebar/index.tsx b/src/components/sidebar/index.tsx index 370b1f154..d28777ba4 100644 --- a/src/components/sidebar/index.tsx +++ b/src/components/sidebar/index.tsx @@ -1,7 +1,8 @@ 'use client'; -import { useState } from 'react'; +import { useEffect, useState } from 'react'; import { AnimatedTooltip } from '@/components/ui/animated-tooltip'; import { signOut } from 'next-auth/react'; +import { refreshDb } from '@/actions/refresh-db'; import Logo from '../landing/logo/logo'; import { @@ -10,8 +11,10 @@ import { MessageSquare, History, PanelRightOpen, + PanelLeftOpen, LogOut, } from 'lucide-react'; +import { RefreshDb } from '../RefreshDb'; export const menuOptions = [ { id: 1, name: 'My Courses', Component: Library, href: '/my-courses' }, @@ -23,6 +26,12 @@ export const menuOptions = [ export const MenuOptions = () => { const [expanded, setExpanded] = useState(true); + useEffect(() => { + if (window.innerWidth < 500) { + setExpanded(false); + } + }, []); + return (
@@ -46,8 +59,9 @@ export const MenuOptions = () => {
+ -
+