Skip to content

Instantly share code, notes, and snippets.

View jean-felipe's full-sized avatar

Jean Felipe jean-felipe

View GitHub Profile
import { defineConfig } from 'vite'
import RubyPlugin from 'vite-plugin-ruby'
import FullReload from "vite-plugin-full-reload"
import vue from "@vitejs/plugin-vue"
export default defineConfig({
plugins: [
RubyPlugin(),
FullReload(["config/routes.rb", "app/views/**/*", "app/javascript/**/*"], { delay: 200 }),
vue(),
import Vue from 'vue';
const init = () => {
const element = document.getElementById('contacts');
if (element !== null) {
const rawData = Object.assign({}, element.dataset);
const propsData = Object.keys(rawData).reduce((acc, prop) => {
acc[prop] = parseData(rawData[prop]);
return acc;
}, {});
<template>
<div>
<div class="wrapper">
<div class="dashboard">
<div class="main-panel">
<div class="content">
<component :is="loadComponent" :data="componentData" />
</div>
</div>
</div>
methods: {
goToProducts() {
window.location.href = '/products';
},
goToHome() {
window.location.href = '/';
},
renderArtistList() {
return this.props.event.artists.map((artist) => {
return (
<li key={artist.id}>{artist.name}</li>
)
})
}
class EventsController < ApplicationController
def new
@props = {
user: current_user,
component: {
name: 'newEvent'
}
}
end
end
@jean-felipe
jean-felipe / ComponentLoader.jsx
Last active March 18, 2020 10:54
componentLoader
import React, { Component } from 'react';
import Events from '../Events/Events'
import NewEvent from '../EventsForm/NewEvent';
class ComponentLoader extends Component {
components = {
eventList: Events,
newEvent: NewEvent
};
<template>
<BaseModal :dismissible="true" @close="closeModal">
<div :class="$style.passwordForm">
<h3 :class="$style.title">Alterar Senha</h3>
<FormField label="Digite sua senha atual" :error="error.currentPassword">
<BaseInput name="currentPassword" type="password" @change="onChangeField"/>
</FormField>
<FormField label="Digite a nova senha" :error="error.password">
<BaseInput name="password" type="password" @change="onChangeField"/>
# stripe_publishable_key: pk_test_ro9jV5SNwGb1yYlQfzG17LHK
#
# production:
# stripe_api_key: sk_live_EeHnL644i6zo4Iyq4v1KdV9H
# stripe_publishable_key: pk_live_9lcthxpSIHbGwmdO941O1XVU
# S3 Credentials
# AWS_ACCESS_KEY_ID: "AKIAJ344T7Q275INSDRQ"
# AWS_SECRET_ACCESS_KEY: "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"