Skip to content

Commit

Permalink
Delete Blog “2020-08-10-my-first-blog”
Browse files Browse the repository at this point in the history
  • Loading branch information
tuan231195 authored and tuan2311 committed Aug 13, 2020
1 parent 6e7cc4f commit db52e19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 34 deletions.
28 changes: 0 additions & 28 deletions blog/2020-08-10-my-first-blog.md

This file was deleted.

6 changes: 3 additions & 3 deletions blog/2020-08-13-extend-popular-libraries-with-es6-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Sometimes, I find myself constrained by the limited functionalities provided by

Let's define a few utility functions

```
```typescript
export function wrap<W extends object, B>(wrapper: W, base: B): W & B {
const proxy = new Proxy(wrapper, {
get(target, property) {
Expand Down Expand Up @@ -43,7 +43,7 @@ The \`wrap\` method takes in 2 arguments: a wrapper object and a base object. It

A sample use case where I extend the IORedis library:

```
```typescript
import IORedis from 'ioredis';
import { from, interval, Observable } from 'rxjs';
import { concatMap, filter, flatMap } from 'rxjs/operators';
Expand Down Expand Up @@ -83,4 +83,4 @@ The \`connectRedis\` method will first attempt to create the base \`ioredis\` ob

You can find the full source code in this [github](https://github.com/tuan231195/vdtn359-news/blob/develop/packages/schema/src/redis/redis.ts).

**Happy coding!**
**Happy coding!**
6 changes: 3 additions & 3 deletions src/components/markdown/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ export const LineContent = styled.span`
display: table-cell;
`;

export function CodeBlock({ children, className }) {
const language = className.replace(/language-/, '');
export function CodeBlock({ children, className = '' }) {
const language = className.replace(/language-/, '') || 'javascript';
return (
<Highlight
{...defaultProps}
code={children}
language={language}
language={language as any}
theme={theme}
>
{({ className, style, tokens, getLineProps, getTokenProps }) => (
Expand Down

0 comments on commit db52e19

Please sign in to comment.