Skip to content

Instantly share code, notes, and snippets.

View replyre's full-sized avatar
🏠
Working from home

Rahul Gupta replyre

🏠
Working from home
View GitHub Profile
import React, { useState, useEffect } from 'react';
import {
View,
Text,
StyleSheet,
FlatList,
TouchableOpacity,
TextInput,
ActivityIndicator,
Alert,
{{ 'section-collection-list.css' | asset_url | stylesheet_tag }}
{{ 'component-card.css' | asset_url | stylesheet_tag }}
{{ 'component-slider.css' | asset_url | stylesheet_tag }}
{%- style -%}
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px;
padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px;
}
/**
* LEARNING MODULE APP WITH PREMIUM TEXT EDITOR
*
* Combines:
* - Original module sidebar and chapter grid layout
* - Premium Medium-like text editor (no cursor jumping)
* - All functionality working properly
*/
import React, { useState, useEffect, createContext, useContext, useRef, useCallback } from 'react';
import React from 'react';
import { Brain, MessageCircle, Send } from 'lucide-react';
function Chat({ chatMessages, inputMessage, chainOfThought, onSendMessage, onInputChange }) {
return (
<div className="h-full bg-white border-l border-gray-300 flex flex-col">
{/* Chain of Thought */}
<div className="bg-gradient-to-r from-purple-50 to-blue-50 border-b border-purple-200 p-4">
<h3 className="text-sm font-semibold text-purple-800 mb-2 flex items-center gap-2">
<Brain className="h-4 w-4" />
export const data = {
nodes: [
// Institution, Discipline, and Domain Nodes
{ id: "school-kiit", name: "KIIT University", group: "school", val: 30 },
{ id: "discipline-btech", name: "BTech", group: "discipline", val: 28 },
// { id: "discipline-mtech", name: "MTech", group: "discipline", val: 28 },
// Semester Nodes
{ id: "semester-1", name: "Semester I", group: "semester", val: 19.5 },
{ id: "semester-2", name: "Semester II", group: "semester", val: 19.5 },
{ id: "semester-3", name: "Semester III", group: "semester", val: 26 },
import { Response } from 'express';
import { AuthRequest } from "../lib/Utils/Middleware";
import cloudinary from '../lib/Utils/Cloundinary';
import Gallery from '../models/Gallery';
import fs from 'fs';
export const uploadImage = (req: AuthRequest, res: Response) => {
if (!req.file || !req.body.title || !req.body.schoolName) {
res.status(400).json({ message: 'File, title, and schoolName are required' });
return;
https://education-system-delta.vercel.app/api/courses