This file contains 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
function calendarTranslation(lang) { | |
const currentYear = new Date().getFullYear() | |
const months = Array.from({length: 12}, function(_, index) { | |
let name = new Date(currentYear, index).toLocaleString(lang, { month: 'long' }) | |
return ({index, name }) | |
}) | |
const days = Array.from({length: 7}, function (_, index) { | |
let name = new Date(currentYear, '00', index).toLocaleString(lang, { weekday: 'long' }) |
This file contains 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 Head from 'next/head' | |
import { API } from 'aws-amplify' | |
import styles from '../styles/Home.module.css' | |
import { listTodos } from '../graphql/queries' | |
import { useEffect, useState } from 'react' | |
export default function Home() { | |
let [todoList, setTodoList] = useState([]) |
This file contains 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
<template> | |
<div class="Example"> | |
<h1>JS IN CSS Reactive Example</h1> | |
<div class="area"> | |
<div class="form"> | |
<label>Select Color</label> | |
<input type="color" v-model="customTheme.bgColor" /> | |
</div> | |
<div class="preview"> | |
<span>{{ customTheme.bgColor }}</span> |
This file contains 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 Head from 'next/head' | |
import { API } from 'aws-amplify' | |
import { useState } from 'react' | |
import { createContact } from '../src/graphql/mutations' | |
import styles from '../styles/Home.module.css' | |
export default function Home() { |
This file contains 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 aws = require('aws-sdk') | |
const ses = new aws.SES() | |
exports.handler = async (event) => { | |
for (const record of event.Records) { | |
if (record.eventName === 'INSERT') { | |
const newData = record.dynamodb.NewImage | |
const name = newData.name.S |
This file contains 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 { defineStore } from 'pinia' | |
export const useProductStore = defineStore('product', { | |
state: () => ({ | |
products: [], | |
isFetchingProducts: false | |
}), | |
getters: { | |
categories () { | |
const categoryList = this.products |
This file contains 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
<template> | |
<h1 class="ProductTitle">Ürünler</h1> | |
<template v-if="isFetchingProducts"> | |
<div class="ProductLoader"> | |
<Loader/> | |
</div> | |
</template> | |
<div v-else class="categories"> | |
<Category | |
v-for="(category, categoryName) in categories" |