This file contains hidden or 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 { SettingsProvider } from "@mittwald/flow-react-components"; | |
export default function Layout(props) { | |
return ( | |
<SettingsProvider type="localStorage" storageKey="my-app"> | |
{props.children} | |
</SettingsProvider> | |
); | |
} |
This file contains hidden or 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
type CollectionDiff<TModified, TNew = TModified, TDeleted = TModified> = { | |
new: TNew[]; | |
modified: TModified[]; | |
deleted: TDeleted[]; | |
}; | |
export const calcCollectionDiff = <L, R = L>( | |
left: Iterable<L> | Array<L>, | |
right: Iterable<R> | Array<R>, | |
getLeftKey: (item: L) => string, |
This file contains hidden or 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
<?php | |
namespace Mittwald\SpacesAuth\OAuth2; | |
use Mw\Spaces\OAuth2\EnvironmentOptions; | |
class ShopwareOptions extends EnvironmentOptions | |
{ | |
public function getClientID() | |
{ | |
return "spaces.de/oauth/cms/shopware/" . $this->getSpaceID(); |
This file contains hidden or 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
// We extend from React.HTMLAttributes to get all the HTML attributes | |
// Don't extend React.HTMLProps! | |
export interface IGreenBoxProps extends React.HTMLAttributes<HTMLDivElement> { | |
title: string; | |
} | |
class GreenBox extends React.Component<IGreenBoxProps, void> { | |
public render() { | |
// If you don't spread children and title, the restProps | |
// still contain these props and compiler will say "no" |
This file contains hidden or 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
#!/bin/sh | |
eval "$(docker run node:6-slim node -e "console.log('echo \"We must go deeper\"');")" |