Skip to content

Instantly share code, notes, and snippets.

View erdemuslu's full-sized avatar
💭
...

Erdem Uslu erdemuslu

💭
...
View GitHub Profile
{"version":1,"resource":"file:///Users/erdemuslu/projects/yoldacom/shipper-dashboard-web/src/components/modals/FindLocationModal/FindLocationModal.tsx","entries":[{"id":"GtBx.tsx","timestamp":1651143410918},{"id":"3Mxx.tsx","timestamp":1651143487009},{"id":"H2kY.tsx","timestamp":1651143505773},{"id":"jJbI.tsx","timestamp":1651144143706},{"id":"rGcx.tsx","timestamp":1651145679092},{"id":"pOm8.tsx","timestamp":1651145849829},{"id":"pTAH.tsx","timestamp":1651146116183},{"id":"qnKV.tsx","timestamp":1651146151036},{"id":"nQ9P.tsx","timestamp":1651146292301},{"id":"ccpM.tsx","timestamp":1651146364914},{"id":"20jj.tsx","timestamp":1651146387757},{"id":"cLfg.tsx","timestamp":1651146434558},{"id":"T152.tsx","timestamp":1651146518456},{"id":"DXEr.tsx","timestamp":1651146739208},{"id":"pqjy.tsx","timestamp":1651146805054},{"id":"Z1rZ.tsx","timestamp":1651146900733},{"id":"WZye.tsx","timestamp":1651147156009},{"id":"1Kzu.tsx","timestamp":1651147335753},{"id":"VM0D.tsx","timestamp":1651147403088},{"id":"YUvV.tsx","timesta
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 16,
"workbench.fontAliasing": "antialiased",
"markdown.preview.fontSize": 16,
"terminal.integrated.cursorStyle": "line",
"editor.renderWhitespace": "boundary",
"editor.tabSize": 2,
"editor.wordWrap": "bounded",
"html.format.wrapLineLength": 80,
import React from 'react';
import { inject, observer } from 'mobx-react';
const View = (observer(({ status, lyricsData }) => (
<div>
<h1>Sarki sozu:</h1>
<p>{status === 'loading' && 'Yukleniyor...'}</p>
<p>{status === 'error' && 'Bir hata olustu'}</p>
<p dangerouslySetInnerHTML={{ __html: status === 'done' ? lyricsData : '' }} />
</div>
import React, { useState } from 'react';
import { inject } from 'mobx-react';
const Search = ({ updateName, getLyrics }) => {
const [value, setValue] = useState({
title: '',
artist: '',
});
const handleValue = (e) => {
import {
action, decorate, observable, runInAction,
} from 'mobx';
import LyricsService from './Service';
function Store() {
this.name = 'Ali';
this.status = '';
this.lyricsData = '';
function LyricsService() {
this.url = 'https://api.lyrics.ovh/v1/';
this.get = async ({ artist = '', title = '' }) => {
const response = await fetch(`${this.url}${artist}/${title}`);
return response.json();
};
}
export default new LyricsService();
import React, { useState } from 'react';
import { inject } from 'mobx-react';
const Search = ({ updateName }) => {
const [value, setValue] = useState('');
const handleValue = (e) => {
setValue(e.target.value);
};
import React, { useEffect } from 'react';
import { inject, observer } from 'mobx-react';
const View = (observer(({ Store }) => {
useEffect(() => {
console.log('view mounted');
}, []);
return (
<div>
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'mobx-react';
import Store from './Store';
import App from './App';
render(
<Provider Store={Store}>
import { action, decorate, observable } from 'mobx';
function Store() {
this.name = 'Ali';
this.updateName = () => {
this.name = 'Mehmet';
};
}