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 formData = useFormData({ | |
name, | |
tel, | |
password, | |
}); | |
await registerUser({ | |
params: formData | |
}) |
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 Logo from './logo.svg' | |
type StyledLogoProps = { | |
active: boolean | |
} | |
// styled-componentsでスタイル定義を直接書いて大きさを指定したり動的にpropsで状態を変化させたりできる。便利。 | |
const StyledLogo = styled(Logo)<StyledLogoProps>` | |
color: ${p => p.active ? 'red' : 'blue'}; | |
width: 20px; |
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 Cat from '../svgs/cat.svg' | |
export default function Home() { | |
return ( | |
<div className="container"> | |
<marquee>SVG Cat!</marquee> | |
<Cat /> | |
<style jsx>{` | |
.container { | |
width: 600px; |
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
// /path1/123/path2/345 | |
location.pathname.match(/\/path1\/([^\/]+)/) | |
// /path1/123 | |
location.pathname.match(/\/path2\/([^\/]+)/) | |
// /path2/345 |
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
export const SomeStatus = { | |
REQUESTED: '申請', | |
DONE: '完了', | |
REJECT: '差し戻し', | |
} as const; | |
export type SomeStatusType = keyof typeof SomeStatus; |
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 sendTestMail(e) { | |
var html = HtmlService.createHtmlOutputFromFile("message").getContent(); | |
var items = e.response.getItemResponses(); | |
var mailDom = ''; | |
var mailTo = ''; | |
var title = ''; | |
items.forEach(function(item){ | |
switch(item.getItem().getTitle()){ | |
case 'mailDom': | |
mailDom = item.getResponse(); |