Skip to content

Instantly share code, notes, and snippets.

View aanation's full-sized avatar

Alexey Avramenko aanation

View GitHub Profile
@aanation
aanation / atomic-router-auth-example.ts
Created July 13, 2023 20:30
atomic router auth example
// protected-route.ts
import type { RouteInstance, RouteParams, RouteParamsAndQuery } from "atomic-router"
import { chainRoute, redirect } from 'atomic-router'
import { type Store, type Event, createEvent, sample } from "effector"
type ChainProtectedParams<Params extends RouteParams> = {
route: RouteInstance<Params>
filter: Store<boolean>

Keybase proof

I hereby claim:

  • I am aanation on github.
  • I am anarion (https://keybase.io/anarion) on keybase.
  • I have a public key ASAfUrTDLQ2DB6MzKyNx1K9K0vLTUjI36Vhj01u06zJzcAo

To claim this, I am signing this object:

@aanation
aanation / api.ts
Created July 10, 2018 06:46
api.ts
import axiosLib from 'axios';
const axios = axiosLib.create({
baseURL: '/api/v1'
});
axios.interceptors.request.use((config) => {
// твой интерцетор запроса
});
@aanation
aanation / swiper.html
Created March 7, 2018 09:19
swiper.html
<template>
<div v-swiper:mySwiper="swiperOption" v-once>
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="image in imagesSrc" :key="image.listId">
<img v-lazy="findThumb(image, tradeCardCarouselThumb).src">
</div>
</div>
<div class="zoom-label">
<div class="icon zoom-white"></div>
<span>Увеличить</span>
@aanation
aanation / trans.js
Last active November 22, 2017 06:35
trans.js
export default {
install() {
Vue.mixin({
beforeCreate: function() {
this.$trans = this.$options.trans;
},
computed: {
lang() {
return this.$trans.lang;
}