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
| worker_processes 1; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| server { | |
| listen 80; | |
| server_name localhost; |
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 axiosInstance from './axios'; | |
| export interface CreatePrivilegeFrom { | |
| title: string; | |
| image: string; | |
| catalogId: string; | |
| categoryId: string; | |
| startDate: string; | |
| endDate: string; | |
| typeId: string; | |
| point: number; |
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 { env } from './env'; | |
| import $axios from 'axios'; | |
| const baseURL = env.apiURL; | |
| const axios = $axios.create({ baseURL }); | |
| axios.interceptors.request.use( | |
| (config) => { | |
| return new Promise((resolve) => { |
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
| interface ENV { | |
| apiURL: string; | |
| } | |
| const pEnv = process.env as Record<string, string>; | |
| console.log(pEnv) | |
| export const env: ENV = { | |
| apiURL: pEnv.REACT_APP_API_URL, | |
| }; |
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
| interface LoginForm { | |
| username: string; | |
| password: string; | |
| } | |
| function Login() { | |
| const navigate = useNavigate(); | |
| const loginForm = useFormik<LoginForm>({ | |
| initialValues: { | |
| username: '', |
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
| <div className="h-screen flex align-items-center justify-content-center"> | |
| <div className="card shadow-2 border-round w-4 p-4"> | |
| <div className="text-center text-3xl font-medium text-900 mb-3">Login</div> | |
| <div className="field"> | |
| <label htmlFor="username" className="block">Username</label> | |
| <InputText id="username" aria-describedby="username-help" className="block w-full b-3" /> | |
| <small id="username-help" className="block text-red-400">Enter your username</small> | |
| </div> | |
| <div className="field"> | |
| <label htmlFor="password" className="block">Password</label> |
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
| const data = [ | |
| { | |
| id: 1, | |
| name: "bulbasaur", | |
| image: | |
| "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/home/1.png", | |
| types: ["grass", "poison"], | |
| weight: 69, | |
| height: 7, | |
| abilities: ["overgrow", "chlorophyll"], |
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
| package main | |
| import ( | |
| "encoding/base64" | |
| "fmt" | |
| "strings" | |
| ) | |
| func main() { | |
| secret := "aWFuZ25vVzpOQU06RU5JTDp0YTpzdTpuaW9K" |
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
| /* Global Styles */ | |
| * { | |
| font-family: 'Roboto', Arial, sans-serif; | |
| color: #616161; | |
| box-sizing: border-box; | |
| -webkit-font-smoothing: antialiased; | |
| -moz-osx-font-smoothing: grayscale; | |
| } |
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
| <form [formGroup]="myForm"> | |
| Value: {{ myForm.value | json }} | |
| <hr> | |
| <input placeholder="First name" formControlName="firstName"> | |
| <input placeholder="Last name" formControlName="lastName"> | |
| <input placeholder="email" formControlName="email"> | |
| <input placeholder="phone" formControlName="phone"> | |
| <div formGroupName="address"> | |
| <input placeholder="house number, road" formControlName="address1"> | |
| <input placeholder="sub districe, district" formControlName="address2"> |
NewerOlder