Skip to content

Instantly share code, notes, and snippets.

View thevahidal's full-sized avatar
💭
Sleeping

Vahid Al thevahidal

💭
Sleeping
View GitHub Profile
@thevahidal
thevahidal / buynow_calculator.js
Created February 12, 2024 14:10 — forked from mahdizojaji/README.md
buynow paid calculator
var total = 0;
const paid_amounts = document.getElementsByClassName("purchase-amount-number");
var persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g];
var arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g];
fixNumbers = function (str)
{
if(typeof str === 'string')
{
@thevahidal
thevahidal / LoginForm.tsx
Last active October 29, 2023 09:57
LoginForm.tsx
"use client";
import React, { useState } from "react";
import { Formik, Field, ErrorMessage, useFormik } from "formik";
import * as Yup from "yup";
import { useRouter } from "next/router";
import { signIn, getCsrfToken } from "next-auth/react";
import Avatar from "@mui/material/Avatar";
@thevahidal
thevahidal / login.tsx
Last active October 29, 2023 09:55
Next.js + Formik + MUI + NextAuth
import React, { useState } from "react";
import LoginForm from '../../components/LoginForm'
async function getServerSideCsrfToken()
{
const csrfToken = await getCsrfToken();
return csrfToken;
}
export default async function SignIn() {
<activity
android:name=".SplashActivity"
android:theme="@style/SplashTheme"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>