diff --git a/._.DS_Store b/._.DS_Store deleted file mode 100755 index 28c42fb..0000000 Binary files a/._.DS_Store and /dev/null differ diff --git a/app/components/ui/DailyDSAEmbed.jsx b/app/components/ui/DailyDSAEmbed.jsx old mode 100644 new mode 100755 diff --git a/app/contexts/UserContext.jsx b/app/contexts/UserContext.jsx index 063b311..4fbfd09 100755 --- a/app/contexts/UserContext.jsx +++ b/app/contexts/UserContext.jsx @@ -1,12 +1,11 @@ 'use client'; import { createContext, useContext, useEffect, useState } from 'react'; -import { createClientComponentClient } from '@supabase/auth-helpers-nextjs'; +import { supabase } from '@/lib/supabase'; const UserContext = createContext(); export const UserProvider = ({ children }) => { const [user, setUser] = useState(null); - const supabase = createClientComponentClient(); useEffect(() => { const getSessionAndUser = async () => { diff --git a/app/globals.css b/app/globals.css index 78ce8c8..678bc30 100755 --- a/app/globals.css +++ b/app/globals.css @@ -1,8 +1,16 @@ @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap'); +@import "tailwindcss"; +@plugin "@tailwindcss/typography"; -@tailwind base; -@tailwind components; -@tailwind utilities; +@custom-variant dark (&:where(.dark, .dark *)); + +@theme { + --font-poppins: "Poppins", sans-serif; +} + +@source "./**/*.{js,ts,jsx,tsx}"; +@source "../pages/**/*.{js,ts,jsx,tsx}"; +@source "../components/**/*.{js,ts,jsx,tsx}"; body { font-family: 'Poppins', sans-serif; diff --git a/app/layout.jsx b/app/layout.jsx index a72a0a7..e1cdea5 100755 --- a/app/layout.jsx +++ b/app/layout.jsx @@ -4,7 +4,7 @@ import { SpeedInsights } from "@vercel/speed-insights/next" import { AuthProvider } from '@/app/contexts/AuthContext'; import { UserProvider } from '@/app/contexts/UserContext'; import ClientLayoutWrapper from "@/app/components/ui/ClientLayoutWrapper"; -import { createServerComponentClient } from "@supabase/auth-helpers-nextjs"; +import { createServerClient } from "@supabase/ssr"; import { cookies } from "next/headers"; const GA_ID = process.env.NEXT_PUBLIC_GA_ID; @@ -57,7 +57,19 @@ export const metadata = { }; export default async function RootLayout({ children }) { - const supabase = createServerComponentClient({ cookies }); + const cookieStore = await cookies(); + const supabase = createServerClient( + process.env.NEXT_PUBLIC_SUPABASE_URL, + process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY, + { + cookies: { + getAll: () => cookieStore.getAll(), + setAll: () => { + // Server Components can't set cookies; middleware/route handlers refresh the session. + }, + }, + } + ); const { data: { session }, } = await supabase.auth.getSession(); diff --git a/app/visualizer/linkedList/types/singly/animation.jsx b/app/visualizer/linkedList/types/singly/animation.jsx index 42bd79c..c4a520f 100755 --- a/app/visualizer/linkedList/types/singly/animation.jsx +++ b/app/visualizer/linkedList/types/singly/animation.jsx @@ -1,13 +1,6 @@ 'use client'; import React, { useState, useRef, useEffect } from 'react'; -import Footer from '@/app/components/footer'; import ResetButton from '@/app/components/ui/resetButton'; -import ExploreOther from '@/app/components/ui/exploreOther'; -import Content from "@/app/visualizer/linkedList/types/singly/content"; -import Quiz from '@/app/visualizer/linkedList/types/singly/quiz'; -import CodeBlock from "@/app/visualizer/linkedList/types/singly/codeBlock"; -import BackToTop from '@/app/components/ui/backtotop'; -import GoBackButton from "@/app/components/ui/goback"; const SinglyLinkedListVisualizer = () => { const [inputValue, setInputValue] = useState(''); @@ -90,17 +83,6 @@ const SinglyLinkedListVisualizer = () => { return (
- {/* go back block here */} -
- -
- - {/* main logic here */} -

- Singly Linked List -

-
-

Visualize Singly Linked List Operations

@@ -211,28 +193,7 @@ const SinglyLinkedListVisualizer = () => {
)} - -

- Test Your Knowledge before moving forward! -

- - - - - -
-
-
-
- -