This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { db } from "./index" | |
| import { usersTable, subjects, decks } from "./schema" | |
| import bcrypt from "bcrypt" | |
| const SUBJECT_IDS = { | |
| MAT1: "00000000-0000-0000-0000-000000000101", | |
| ECO: "00000000-0000-0000-0000-000000000102", | |
| MNG: "00000000-0000-0000-0000-000000000103", | |
| OIKT: "00000000-0000-0000-0000-000000000104", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use client"; | |
| import { useState } from "react"; | |
| import Link from "next/link"; | |
| type Mode = "login" | "register"; | |
| export default function AuthForm({ mode }: { mode: Mode }) { | |
| const [err, setErr] = useState(""); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {FullDeckDto, FullSubjectDto} from "@/shared/types"; | |
| export const mockSubjects: FullSubjectDto[] = [ | |
| { id: 1, name: "Matematika 1", createdAt: new Date("2024-01-10") }, | |
| { id: 2, name: "Ekonomija", createdAt: new Date("2024-01-11") }, | |
| { id: 3, name: "Menadžment", createdAt: new Date("2024-01-12") }, | |
| { id: 4, name: "OIKT", createdAt: new Date("2024-01-13") }, | |
| { id: 5, name: "Psihologija", createdAt: new Date("2024-01-14") }, | |
| { id: 6, name: "Marketing", createdAt: new Date("2024-01-15") }, | |
| { id: 7, name: "Osnovi organizacije", createdAt: new Date("2024-01-16") }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "items": [ | |
| { | |
| "id": 1, | |
| "title": "Chocolate", | |
| "description": "Chocolate is a food made from cacao beans. It is used in many desserts like pudding, cakes and candy", | |
| "amount": 0 | |
| }, | |
| { | |
| "id": 2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .navBar { | |
| display: flex; | |
| flex-direction: row; | |
| background-color: rgb(211, 211, 211); | |
| border-bottom-style: solid; | |
| border-bottom-width: 2px; | |
| border-bottom-color: rgb(175, 175, 175); | |
| align-items: center; | |
| min-height: 40px; | |
| padding-left: 25px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { DeflyWalletConnect } from '@blockshake/defly-connect' | |
| import { DaffiWalletConnect } from '@daffiwallet/connect' | |
| import { PeraWalletConnect } from '@perawallet/connect' | |
| import { PROVIDER_ID, ProvidersArray, WalletProvider, useInitializeProviders, useWallet } from '@txnlab/use-wallet' | |
| import algosdk from 'algosdk' | |
| import { SnackbarProvider } from 'notistack' | |
| import { useState } from 'react' | |
| import AppCalls from './components/AppCalls' | |
| import Calculator from './components/Calculator' | |
| import ConnectWallet from './components/ConnectWallet' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { loadStdlib, ask } from '@reach-sh/stdlib'; | |
| import * as backend from './build/index.main.mjs'; | |
| const stdlib = loadStdlib(); | |
| const isAlice = await ask.ask( | |
| `Are you Alice?`, | |
| ask.yesno | |
| ); | |
| const who = isAlice ? 'Alice' : 'Bob'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { loadStdlib } from '@reach-sh/stdlib'; | |
| import * as backend from './build/index.main.mjs'; | |
| const stdlib = loadStdlib({REACH_NO_WARN: 'Y'}); | |
| // const stdlib = loadStdlib(process.env); | |
| const startingBalance = stdlib.parseCurrency(100); | |
| const accAlice = await stdlib.newTestAccount(startingBalance); | |
| const accBob = await stdlib.newTestAccount(startingBalance); | |
| const fmt = (x) => stdlib.formatCurrency(x, 4); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { loadStdlib } from '@reach-sh/stdlib'; | |
| import * as backend from './build/index.main.mjs'; | |
| const stdlib = loadStdlib({REACH_NO_WARN: 'Y'}); | |
| // const stdlib = loadStdlib(process.env); | |
| const startingBalance = stdlib.parseCurrency(100); | |
| const accAlice = await stdlib.newTestAccount(startingBalance); | |
| const accBob = await stdlib.newTestAccount(startingBalance); | |
| const fmt = (x) => stdlib.formatCurrency(x, 4); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { loadStdlib } from '@reach-sh/stdlib'; | |
| import * as backend from './build/index.main.mjs'; | |
| const stdlib = loadStdlib(process.env); | |
| const startingBalance = stdlib.parseCurrency(100); | |
| const accAlice = await stdlib.newTestAccount(startingBalance); | |
| const accBob = await stdlib.newTestAccount(startingBalance); | |
| const fmt = (x) => stdlib.formatCurrency(x, 4); | |
| const getBalance = async (who) => fmt(await stdlib.balanceOf(who)); |
NewerOlder