-
Notifications
You must be signed in to change notification settings - Fork 34
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
load calendar data #100
load calendar data #100
Changes from all commits
211ff83
3423867
7c85ccf
e2cc158
a51e828
70151c3
921a840
b040c78
ad921cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,5 +48,4 @@ thumbs.db | |
# turbo build log | ||
**/.turbo/* | ||
|
||
.env | ||
.turbo | ||
.env |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,43 @@ | ||
{ | ||
"name": "api", | ||
"scripts": { | ||
"lint": "eslint . --fix", | ||
"format": "prettier --write \"**/*.{js,cjs,mjs,ts,tsx,md,json}\"", | ||
"dev": "wrangler dev src/index.ts", | ||
"deploy": "wrangler deploy --minify src/index.ts", | ||
"db:generate": "drizzle-kit generate:sqlite", | ||
"db:migrate": "wrangler d1 migrations apply demo --local", | ||
"db:migrate:prod": "wrangler d1 migrations apply demo --remote", | ||
"db:studio": "drizzle-kit studio", | ||
"db:studio:local": "cross-env LOCAL_DB_PATH=$(find .wrangler/state/v3/d1/miniflare-D1DatabaseObject -type f -name '*.sqlite' -print -quit) drizzle-kit studio" | ||
}, | ||
"dependencies": { | ||
"@hono/zod-validator": "^0.2.1", | ||
"@oslojs/crypto": "^1.0.1", | ||
"@oslojs/encoding": "^1.1.0", | ||
"@tsndr/cloudflare-worker-jwt": "^2.5.3", | ||
"arctic": "^1.7.0", | ||
"better-sqlite3": "^9.6.0", | ||
"cross-env": "^7.0.3", | ||
"drizzle-orm": "^0.30.9", | ||
"hono": "^4.2.8", | ||
"oslo": "^1.2.0", | ||
"zod": "^3.23.4" | ||
}, | ||
"devDependencies": { | ||
"@miti/eslint-config": "workspace:*", | ||
"@miti/prettier-config": "workspace:*", | ||
"@miti/tsconfig": "workspace:*", | ||
"@cloudflare/workers-types": "^4.20240423.0", | ||
"drizzle-kit": "^0.20.17", | ||
"wrangler": "^3.52.0" | ||
}, | ||
"eslintConfig": { | ||
"root": true, | ||
"extends": ["@miti/eslint-config/base", "@miti/eslint-config/react"] | ||
}, | ||
"prettier": "@miti/prettier-config" | ||
"name": "api", | ||
"scripts": { | ||
"lint": "eslint . --fix", | ||
"format": "prettier --write \"**/*.{js,cjs,mjs,ts,tsx,md,json}\"", | ||
"dev": "wrangler dev src/index.ts", | ||
"deploy": "wrangler deploy --minify src/index.ts", | ||
"db:generate": "drizzle-kit generate:sqlite", | ||
"db:migrate": "wrangler d1 migrations apply demo --local", | ||
"db:migrate:prod": "wrangler d1 migrations apply demo --remote", | ||
"db:studio": "drizzle-kit studio", | ||
"db:studio:local": "cross-env LOCAL_DB_PATH=$(find .wrangler/state/v3/d1/miniflare-D1DatabaseObject -type f -name '*.sqlite' -print -quit) drizzle-kit studio" | ||
}, | ||
"dependencies": { | ||
"@hono/zod-validator": "^0.2.1", | ||
"@oslojs/crypto": "^1.0.1", | ||
"@oslojs/encoding": "^1.1.0", | ||
"@tsndr/cloudflare-worker-jwt": "^2.5.3", | ||
"arctic": "^1.7.0", | ||
"better-sqlite3": "^9.6.0", | ||
"cross-env": "^7.0.3", | ||
"drizzle-orm": "^0.30.9", | ||
"hono": "^4.2.8", | ||
"oslo": "^1.2.0", | ||
"zod": "^3.23.4" | ||
}, | ||
"devDependencies": { | ||
"@miti/eslint-config": "workspace:*", | ||
"@miti/prettier-config": "workspace:*", | ||
"@miti/tsconfig": "workspace:*", | ||
"@cloudflare/workers-types": "^4.20240423.0", | ||
"drizzle-kit": "^0.20.17", | ||
"wrangler": "^3.52.0" | ||
}, | ||
"eslintConfig": { | ||
"root": true, | ||
"extends": [ | ||
"@miti/eslint-config/base", | ||
"@miti/eslint-config/react" | ||
] | ||
}, | ||
"prettier": "@miti/prettier-config" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"$schema": "https://ui.shadcn.com/schema.json", | ||
"style": "new-york", | ||
"rsc": false, | ||
"tsx": true, | ||
"tailwind": { | ||
"config": "tailwind.config.js", | ||
"css": "src/index.css", | ||
"baseColor": "neutral", | ||
"cssVariables": true, | ||
"prefix": "" | ||
}, | ||
"aliases": { | ||
"components": "@/components", | ||
"utils": "@/lib/utils", | ||
"ui": "@/components/ui", | ||
"lib": "@/lib", | ||
"hooks": "@/hooks" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -12,49 +12,58 @@ | |||||
"dependencies": { | ||||||
"@headlessui/react": "^1.7.15", | ||||||
"@heroicons/react": "^2.0.18", | ||||||
"@miti/query": "*", | ||||||
"@miti/types": "*", | ||||||
"@radix-ui/react-dialog": "^1.1.2", | ||||||
"@radix-ui/react-icons": "^1.3.0", | ||||||
"@tanstack/react-query": "^4.29.15", | ||||||
"class-variance-authority": "^0.7.0", | ||||||
"clsx": "^2.1.1", | ||||||
"date-fns": "^2.30.0", | ||||||
"dexie": "^3.2.4", | ||||||
"i18next": "^23.2.3", | ||||||
"i18next-browser-languagedetector": "^7.0.2", | ||||||
"i18next-http-backend": "^2.2.1", | ||||||
"lucide-react": "^0.453.0", | ||||||
"nepali-date-converter": "^3.3.2", | ||||||
"nepali-datetime": "^1.2.1", | ||||||
"react": "^18.2.0", | ||||||
"react-dom": "^18.2.0", | ||||||
"react-hot-toast": "^2.4.1", | ||||||
"react-router-dom": "^6.12.1", | ||||||
"workbox-window": "^7.0.0", | ||||||
"@miti/query": "*", | ||||||
"@miti/types": "*" | ||||||
"tailwind-merge": "^2.5.4", | ||||||
"tailwindcss-animate": "^1.0.7", | ||||||
"vaul": "^1.1.0", | ||||||
"workbox-window": "^7.0.0" | ||||||
}, | ||||||
"devDependencies": { | ||||||
"@eslint/js": "^9.11.1", | ||||||
"@types/node": "^22.7.9", | ||||||
"@types/react": "^18.3.12", | ||||||
"@types/react-dom": "^18.3.1", | ||||||
"@typescript-eslint/eslint-plugin": "^5.59.0", | ||||||
"@typescript-eslint/parser": "^5.59.0", | ||||||
"@vitejs/plugin-react": "^4.3.2", | ||||||
"@vitejs/plugin-react-swc": "^3.0.0", | ||||||
"autoprefixer": "^10.4.14", | ||||||
"eslint": "^9.11.1", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification ESLint v9.11.1 is an incorrect version - this appears to be an error The specified ESLint version (^9.11.1) in apps/vite/package.json is incorrect as ESLint's current stable version is in the 8.x range. Additionally, there are incompatible dependency versions:
The version should be downgraded to match the workspace's ESLint version (^8.56.0) to maintain compatibility across the monorepo. 🔗 Analysis chainVerify compatibility with major version updates The significant version updates to ESLint (^9.11.1), TypeScript (^5.5.3), and Vite (^5.4.8) may require additional configuration changes or code modifications. Also applies to: 58-58, 60-60 Let me gather more information about the ESLint configuration and potential compatibility issues. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Check for potential TypeScript and ESLint compatibility issues
# Look for tsconfig.json and verify its contents are compatible with TS 5.5
echo "Checking TypeScript configuration..."
if [ -f "tsconfig.json" ]; then
cat tsconfig.json
fi
# Check for ESLint configuration
echo "Checking ESLint configuration..."
for config in .eslintrc.* .eslintrc; do
if [ -f "$config" ]; then
cat "$config"
fi
done
# Look for Vite configuration
echo "Checking Vite configuration..."
for config in vite.config.ts vite.config.js; do
if [ -f "$config" ]; then
cat "$config"
fi
done
Length of output: 612 Script: #!/bin/bash
# Search for ESLint config files recursively and check package dependencies
echo "Searching for ESLint config files..."
fd -e .eslintrc.js -e .eslintrc.json -e .eslintrc.yaml -e .eslintrc.yml
echo -e "\nChecking package.json files for ESLint related dependencies..."
fd package.json --exec grep -l "eslint"
echo -e "\nChecking content of found package.json files..."
fd package.json --exec cat {} \; | grep -A 5 -B 5 "eslint"
echo -e "\nChecking for TypeScript related files..."
fd tsconfig.json
Length of output: 5390 |
||||||
"eslint-plugin-react-hooks": "^5.1.0-rc.0", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid using release candidate versions in production The ESLint React Hooks plugin is using a release candidate version (^5.1.0-rc.0), which may not be stable for production use. - "eslint-plugin-react-hooks": "^5.1.0-rc.0",
+ "eslint-plugin-react-hooks": "^4.6.0", 📝 Committable suggestion
Suggested change
|
||||||
"eslint-plugin-react-refresh": "^0.4.12", | ||||||
"globals": "^15.9.0", | ||||||
"postcss": "^8.4.24", | ||||||
"prettier": "^2.8.8", | ||||||
"prettier-plugin-tailwindcss": "^0.3.0", | ||||||
"react-i18next": "^13.0.1", | ||||||
"tailwindcss": "^3.4.14", | ||||||
"typescript": "^5.5.3", | ||||||
"typescript-eslint": "^8.7.0", | ||||||
"vite": "^5.4.8", | ||||||
"vite-plugin-pwa": "^0.16.4", | ||||||
"workbox-cacheable-response": "^7.0.0", | ||||||
"workbox-expiration": "^7.0.0", | ||||||
"workbox-google-analytics": "^7.0.0", | ||||||
"workbox-precaching": "^7.0.0", | ||||||
"workbox-routing": "^7.0.0", | ||||||
"workbox-strategies": "^7.0.0", | ||||||
"@eslint/js": "^9.11.1", | ||||||
"@types/react": "^18.3.11", | ||||||
"@types/react-dom": "^18.3.1", | ||||||
"@vitejs/plugin-react": "^4.3.2", | ||||||
"eslint": "^9.11.1", | ||||||
"eslint-plugin-react-hooks": "^5.1.0-rc.0", | ||||||
"eslint-plugin-react-refresh": "^0.4.12", | ||||||
"globals": "^15.9.0", | ||||||
"tailwindcss": "^3.4.14", | ||||||
"typescript": "^5.5.3", | ||||||
"typescript-eslint": "^8.7.0", | ||||||
"vite": "^5.4.8" | ||||||
"workbox-strategies": "^7.0.0" | ||||||
} | ||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,35 @@ | ||
import { useContext } from 'react' | ||
import { Route, Routes } from 'react-router-dom' | ||
import AnnouncementAlert from './components/AnnouncementAlert' | ||
import { DarkModeContext } from './components/DarkModeProvider' | ||
import Footer from './components/Footer' | ||
import Navbar from './components/Navbar' | ||
import About from './pages/About' | ||
import DateConverter from './pages/DateConverter' | ||
import GoogleApiDisclosure from './pages/GoogleApiDisclosure' | ||
import Home from './pages/Home' | ||
import PrivacyPolicy from './pages/PrivacyPolicy' | ||
import Calendar2 from './pages/Calendar2' | ||
import { useContext } from "react" | ||
import { Route, Routes } from "react-router-dom" | ||
import AnnouncementAlert from "./components/AnnouncementAlert" | ||
import { DarkModeContext } from "./components/DarkModeProvider" | ||
import Footer from "./components/Footer" | ||
import Navbar from "./components/Navbar" | ||
import About from "./pages/About" | ||
import DateConverter from "./pages/DateConverter" | ||
import GoogleApiDisclosure from "./pages/GoogleApiDisclosure" | ||
import Home from "./pages/Home" | ||
import PrivacyPolicy from "./pages/PrivacyPolicy" | ||
import Calendar2 from "./pages/Calendar2" | ||
|
||
const Body = () => { | ||
const { darkMode } = useContext(DarkModeContext) | ||
|
||
return ( | ||
<div className={(darkMode ? 'dark' : '') + ' flex min-h-screen flex-col'}> | ||
<AnnouncementAlert /> | ||
<div className={(darkMode ? "dark" : "") + " flex min-h-screen flex-col"}> | ||
{/* <AnnouncementAlert /> */} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Remove unused import and commented component The
🔗 Analysis chainVerify if AnnouncementAlert should be removed The 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Check if AnnouncementAlert is used elsewhere in the codebase
rg -l "AnnouncementAlert"
Length of output: 279 Script: #!/bin/bash
# Check for AnnouncementAlert in the codebase with ripgrep
rg "AnnouncementAlert" -A 2
# Also check imports specifically
rg "import.*AnnouncementAlert"
# Check if the component file exists
fd "AnnouncementAlert"
Length of output: 891 |
||
<Navbar /> | ||
<div className="flex-grow"> | ||
<Routes> | ||
<Route path="/:pageType?/:BSYear?/:BSMonth?" element={<Home />} /> | ||
<Route path="/calendar2" element={<Calendar2 />} /> | ||
{/* <Route path="/:pageType?/:BSYear?/:BSMonth?" element={<Home />} /> */} | ||
<Route path="/" element={<Calendar2 />} /> | ||
<Route path="/calendar/:BSYear?/:BSMonth?" element={<Calendar2 />} /> | ||
<Route path="/privacy" element={<PrivacyPolicy />} /> | ||
<Route path="/converter" element={<DateConverter />} /> | ||
<Route path="/about" element={<About />} /> | ||
<Route path="/google-api-disclosure" element={<GoogleApiDisclosure />} /> | ||
<Route | ||
path="/google-api-disclosure" | ||
element={<GoogleApiDisclosure />} | ||
/> | ||
</Routes> | ||
</div> | ||
<Footer /> | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -12,7 +12,7 @@ import { | |||||
import nepaliNumber from "../helper/nepaliNumber" | ||||||
import useLanguage from "../helper/useLanguage" | ||||||
import { useUser } from "@miti/query/user" | ||||||
import { classNames } from "../helper/utils" | ||||||
import { cn } from "@/lib/utils" | ||||||
import type { DayData } from "@miti/types" | ||||||
import type { CalendarEventsResult } from "@miti/types" | ||||||
import AddEventModal from "./AddEventModal" | ||||||
|
@@ -101,7 +101,7 @@ export default function MonthCalendar({ | |||||
setSelectedDay(dayInNepaliDate) | ||||||
}} | ||||||
style={dayIdx === 0 ? { gridColumnStart: day.week_day + 1 } : {}} | ||||||
className={classNames( | ||||||
className={cn( | ||||||
"p-1 font-mukta leading-3 hover:bg-gray-100 focus:z-10", | ||||||
(isSelectedDay || isToday) && "font-semibold", | ||||||
isToday && "bg-indigo-200 font-semibold text-indigo-600", | ||||||
|
@@ -130,14 +130,12 @@ export default function MonthCalendar({ | |||||
style={{ | ||||||
backgroundColor: color ? colors[color] : "#475569", | ||||||
}} | ||||||
className={classNames( | ||||||
`mx-[1px] inline-block h-1 w-1 rounded-full` | ||||||
)} | ||||||
className={cn(`mx-[1px] inline-block h-1 w-1 rounded-full`)} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Simplify template literal usage. The template literal is unnecessary when no interpolation is needed. - className={cn(`mx-[1px] inline-block h-1 w-1 rounded-full`)}
+ className={cn('mx-[1px] inline-block h-1 w-1 rounded-full')} 📝 Committable suggestion
Suggested change
🧰 Tools🪛 Biome
|
||||||
></span> | ||||||
))} | ||||||
<time | ||||||
dateTime={day.AD_date.ad} | ||||||
className={classNames( | ||||||
className={cn( | ||||||
"mx-auto mt-0 flex items-center justify-center rounded-full pt-0 text-xl" | ||||||
)} | ||||||
> | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use explicit versions for workspace dependencies
Using "*" for workspace dependencies (@miti/query, @miti/types) can lead to unexpected breaking changes and non-deterministic builds. Consider using explicit versions or workspace: protocol.
📝 Committable suggestion