Skip to content

Instantly share code, notes, and snippets.

View rahulmore01's full-sized avatar
💭
learning typescript

Rahul Ashok More rahulmore01

💭
learning typescript
View GitHub Profile
@rahulmore01
rahulmore01 / tsconfig.json
Created October 31, 2023 05:41
typescript
{
"compilerOptions": {
"target": "ES2020",
"module": "CommonJS",
"strict": true,
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules"]
import React from "react";
import VideoPlayer from "@/components/VideoPlayer";
const Home = () => {
return (
<div className="w-screen h-screen flex flex-col gap-4 text-lg font-semibold justify-center items-center ">
<h1>Video Player App</h1>
<VideoPlayer />
</div>
);
"use client";
import React from "react";
import ReactPlayer from "react-player";
const VideoPlayer = () => {
let videosrc = "/videos/next.mp4";
return (
<div>
<h1>my custome player</h1>
"use client";
import React from "react";
import ReactPlayer from "react-player";
const VideoPlayer = () => {
//video path
let videosrc = "/videos/next.mp4";
return (
<div>
@rahulmore01
rahulmore01 / icon.jsx
Created November 26, 2023 05:14
react-icons
import { Bs0Circle } from "react-icons/bs";
function Question() {
 return (
 <h3>
 This is a react icon : <Bs0Circle/>
 </h3>
 );
}
@rahulmore01
rahulmore01 / layout.js
Created December 7, 2023 01:50
favicon in nextjs
export const metadata = {
title: "Rahul More",
description: "A Frontend Developer Portfolio",
//line 5 to 8 is only addition to make in layout.js
icons: {
icon: "/images/rahul.png",
},
};
export default function RootLayout({ children }) {
@rahulmore01
rahulmore01 / layout.js
Last active December 25, 2023 13:23
favicon
export const metadata = {
title: "Rahul More",
description: "A Frontend Developer Portfolio",
};
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
{/* line 11 is the only addition to make in layout.js */}
@rahulmore01
rahulmore01 / toggle.jsx
Last active December 30, 2023 11:28
genui project
"use client";
import { Button } from "@/components/ui/button";
import { Code2, PanelsTopLeft } from "lucide-react";
import { useState } from "react";
interface UiToggleProps {
onToggleCode: (newToggleCodeValue: boolean) => void;
}
@rahulmore01
rahulmore01 / GenerateUi.jsx
Created December 30, 2023 11:31
genui project
import UiToggle from "@/components/UiToggle";
import React, { useState } from "react";
interface GenerateUiProps {
onToggleCode: (newToggleCodeValue: boolean) => void;
}
const GenerateUi: React.FC<GenerateUiProps> = ({ onToggleCode }) => {
const [isToggleCode, setIsToggleCode] = useState(true);
@rahulmore01
rahulmore01 / route.js
Last active July 11, 2024 08:39
next auth route file to setup next auth
import NextAuth from "next-auth/next";
import GoogleProvider from "next-auth/providers/google";
const handler = NextAuth({
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_ID,
clientSecret: process.env.GOOGLE_SECRET,
}),
],